Skip to main content

Request Body

FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”amount”stringrequiredAmount to withdraw in USDC100.50
”idempotency_key”stringoptionalFull UUID string. Prevents duplicate withdrawals. Required when the account has two-factor authentication on550e8400-e29b-41d4-a716-446655440000
”agent_wallet”stringoptionalAgent wallet address69trU9A5…
“expiry_window”integeroptionalSignature expiry in milliseconds30000
”two_factor”objectconditionalTwo-factor proof. Required when the account has two-factor authentication on. Not part of the signed payload. See below

Two-factor authentication

If the account’s owner has turned on two-factor authentication, every withdrawal needs a proof, including withdrawals that an agent wallet signs. To turn it on or manage factors, see Two-factor authentication.
  • Send an idempotency_key. A retry with the same key and the same request returns the first result, so a retry does not need a new code.
  • Send the proof in two_factor, outside the signed data. For an authenticator app, use {"type": "totp", "code": "123456"}. Recovery keys do not authorize withdrawals.

Response

  • Status 200: Success
  • Status 400: Invalid request parameters
  • Status 409: idempotency_key already used for a different request. A retry of the same request returns the first result
  • Status 500: Internal server error

Code Example (Python)