Signed messages
Which EIP-712 message each signed call uses, and when to use each version.
Agent prompt
Help me with: Signed messages. Which EIP-712 message each signed call uses, and when to use each version.
Target environment: {environment} (chain ID {chainId}). Recorded signing cases keep their original environment.
{executionGuidance}
Read this first: {origin}/bundle/reference/signing/index.md (~30 KB, plain Markdown: this page plus the AGENTS.md rules, Signing, Environments).
Fetch other pages from the index at {origin}/llms.txt only as you need them. {origin}/downloads/contract.json is a machine-readable contract for tools, not for reading.
Rules: follow AGENTS.md; do not send requests without the user asking you to; read credentials from environment variables; never retry writes automatically; show me the code and how to run it. 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
| Call | Message, and when to use each |
|---|---|
set_derisk_mm_ratio | SetDeriskToMaintenanceMarginRatio |
login_wallet | WalletLogin |
bulk_orders | every 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_order | Order / OrderWithBuilderFee. Use OrderWithBuilderFee when order.builder is set to a non-zero address, otherwise Order. |
add_position_margin | AddIsolatedPositionMargin |
set_position_config | SetSubAccountPositionMarginConfig |
transfer | Transfer / 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. |
withdrawal | Withdrawal / WithdrawalV2. Withdrawal when the currency id fits uint8 (<= 255), else WithdrawalV2. |
vault_burn_tokens | VaultBurnLpToken |
vault_invest | VaultInvestV3 |
vault_redeem | VaultRedeemV3 |