Onboarding
Changed onOnboarding verifies that the caller owns the StarkNet address and enters them into the database. This call is idempotent.
An account onboarded under an Ethereum account can prove that the Ethereum account agreed to the link by sending PARADEX-PARENT-SIWE-MESSAGE and PARADEX-PARENT-SIGNATURE. The message is a Sign-In with Ethereum (EIP-4361) message, base64 encoded, and the signature is the Ethereum account's personal_sign over it, 0x-prefixed hex. The message must have:
-
statement: the line below, where <account> is the Paradex account address in lowercase hex with the 0x prefix and no leading zeros, and <chain> is starknet_chain_id from GET /system/config;
Link this wallet as the parent of Paradex account <account> on <chain> -
address: the Ethereum account;
-
domain: the Paradex app domain, as for /v2 onboarding;
-
chain ID: l1_chain_id from GET /system/config;
-
issued at within the last 5 minutes, and an expiration time at most 5 minutes after it (30 seconds when omitted).
Only an externally owned Ethereum account can produce this signature; a smart contract wallet cannot.
A retry of an onboarding whose deployment failed needs these headers too, signed by the Ethereum account the account was first onboarded under. Calls for an account that is already onboarded do not need them.
Request
- Base URLhttps://api.prod.paradex.trade/v1
- URLhttps://api.prod.paradex.trade/v1/onboarding
- Authnone declared. Required headers: PARADEX-ETHEREUM-ACCOUNT, PARADEX-STARKNET-ACCOUNT, PARADEX-STARKNET-SIGNATURE
Headers
Ethereum account used to onboard
Starknet address
Starknet signature
Base64 Sign-In with Ethereum message linking the Ethereum account as the parent of this account
EIP-191 personal_sign by the Ethereum account over PARADEX-PARENT-SIWE-MESSAGE, 0x-prefixed hex
Request body
Example request
{
"marketing_code": "abcd:code1",
"public_key": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9",
"referral_code": "cryptofox8",
"utm": {
"campaign": "summer2024",
"source": "google",
"type": "clickthrough"
}
}Response
An empty response
Changes
- warning
added the new
ADDRESS_BOOK_NOT_PARADEX_ACCOUNTenum value to the////response property for the response status - warning
added the new
ADDRESS_BOOK_NOT_PARADEX_ACCOUNTenum value to the////response property for the response status - warning
added the new
ADDRESS_BOOK_REPEATED_IN_IMPORTenum value to the////response property for the response status - warning
added the new
ADDRESS_BOOK_REPEATED_IN_IMPORTenum value to the////response property for the response status - warning
added the new
STARKNET_PARENT_ONBOARDING_DISABLEDenum value to the////response property for the response status - warning
added the new
STARKNET_PARENT_ONBOARDING_DISABLEDenum value to the////response property for the response status
- warning
- warning
added the new
SESSION_EXPIREDenum value to the////response property for the response status - warning
added the new
SESSION_EXPIREDenum value to the////response property for the response status - warning
added the new
SESSION_REVOKEDenum value to the////response property for the response status - warning
added the new
SESSION_REVOKEDenum value to the////response property for the response status
- warning