Developers

Signed messages

Which EIP-712 message each signed call uses, and when to use each version.

Orders, transfers, withdrawals and wallet login carry a signature from your key (EIP-712). The SDKs sign for you; these pages are for signing by hand or for finding out why a signature is rejected. Signing walks through it step by step.

Which message to sign

CallMessage, and when to use each
set_derisk_mm_ratioSetDeriskToMaintenanceMarginRatio
login_walletWalletLogin
bulk_ordersevery element of orders separately, with its own nonce and expiration (the field tables' order. paths mean that element): Order / OrderWithBuilderFee. Each order is signed on its own, like create_order: OrderWithBuilderFee when that order's builder is set to a non-zero address, otherwise Order. The cancel lists and time_to_live_ms are not signed.
create_orderOrder / OrderWithBuilderFee. Use OrderWithBuilderFee when order.builder is set to a non-zero address, otherwise Order.
add_position_marginAddIsolatedPositionMargin
set_position_configSetSubAccountPositionMarginConfig
transferTransfer / TransferV2 / TransferV3. If from_wallet_type and to_wallet_type are both set: TransferV2 when the currency id fits uint8 (<= 255), else TransferV3. If neither is set: Transfer (only for currency ids <= 255). Setting only one is rejected. Sign TransferV3 only for currency ids above 255.
withdrawalWithdrawal / WithdrawalV2. Withdrawal when the currency id fits uint8 (<= 255), else WithdrawalV2.
vault_burn_tokensVaultBurnLpToken
vault_investVaultInvestV3
vault_redeemVaultRedeemV3
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers