Skip to navigation

Onboarding

Onboarding 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.

Headers

PARADEX-ETHEREUM-ACCOUNTstringRequired
Ethereum account used to onboard
PARADEX-STARKNET-ACCOUNTstringRequired
Starknet address
PARADEX-STARKNET-SIGNATUREstringRequired
Starknet signature
PARADEX-PARENT-SIWE-MESSAGEstringOptional

Base64 Sign-In with Ethereum message linking the Ethereum account as the parent of this account

PARADEX-PARENT-SIGNATUREstringOptional

EIP-191 personal_sign by the Ethereum account over PARADEX-PARENT-SIWE-MESSAGE, 0x-prefixed hex

Request

Onboarding user public_key and optional referral_code or marketing_code

marketing_codestringOptional
Marketing code of the campaign the user is being onboarded via.
portfolio_marginbooleanOptional
When true, the new account is onboarded directly into Portfolio Margin mode. Only valid for main accounts and subaccounts.
public_keystringOptional
Public key of the user being onboarded.
referral_codestringOptional
Referral code of the user who referred the user being onboarded.
utmobjectOptional

UTM tracking parameters (optional).

Response

An empty response

Errors

400
Bad Request Error
401
Unauthorized Error