Skip to main content

Domain

verifyingContract is your vault, not the factory. Fetch via GET /api/me/vault → vaultAddress (portfolio:read scope), or on-chain via VaultFactory.vaultOf(eoa).
Generation 2: the request takes an optional vault; sign in the domain of that vault. In upgraded vaults, withdrawals can only be sent to your own wallet or platform-approved destinations (400 withdrawal_destination_not_allowed). See Withdraw.

Struct

Key fields:
  • amount: In the EIP-712 struct, amount is specified in base units (uint256, 6 decimals for USDC — e.g. 100_000_000 for 100 USDC). In the REST API request body, it is passed as a human-readable decimal string (e.g. "100").
  • salt: A random uint256 value chosen by the caller. It is not a sequential nonce. The vault contract tracks consumed digests via usedDigests[digest].
  • deadline: Expiration timestamp in Unix seconds. Mapped to expiry in the REST API request. At most 8 days (192 hours) minus 60 s after we receive the request: sign at most 191 hours ahead, or POST /api/withdrawals/request answers 400 expiry_too_far (nothing is created, the 2FA code is not used).

Signing example

Request

To show the fee first, call GET /api/me/withdrawals/fee with the same amount and destination. It does not submit a withdrawal, but it is not free of side effects: an answered estimate to a destination other than your own wallet can start, in the background, the source-wallet AML screen that the request would run (cached for 1 hour per wallet), with the same outcome. A high-risk result suspends the account and opens a compliance case, as it would at the request (RND-4000).

Field mapping

A body outside these formats is refused with 400 invalid_request before the 2FA code, the signature or the withdrawal is checked, and before anything is created (RND-4040). The wallet address is resolved from the API key’s associatedWallet (or, on partner-API access, the X-User-Wallet header) — clients do not pass userWallet in the body. Response mirrors the current state after the request. Poll GET /api/me/withdrawals/{id}, or watch the withdrawal_<state> frames on the user_activity WebSocket channel, for transitions. The on-chain success arrives as withdrawal_confirmed on the vault_activity channel (subscribed with your vault address), not on user_activity. If a transient network disconnect or 503 withdrawal_unknown occurs, do not sign a new withdrawal. Re-send the exact same body (same salt and userSig). Stored requests are safely replayed without duplicate reservations or fee double-charging.