Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Withdraw

POST /v1/withdraw
This route is signed, not a session route. The request must be signed by the account's own key; a registered signing key cannot withdraw.
Request
{ "user": "0xAb58…", "amount": 25000000, "nonce": 44, "signature": "0x…" }
body useraddressrequired
The account.
body amountintegerrequired
micro-USDC, more than 0, at most your free cash.
body nonceuint64required
From the account's nonce space.
body signaturestringrequired
The EIP-712 WithdrawalRequest.
The exchange debits your free cash, then signs a withdrawal for the settlement contract. The answer is that signed withdrawal, ready to submit:
200 OK
{ "pending": false, "paid": false, "requestNonce": 44, "withdrawal": { "user": "0xAb58…", "to": "0xAb58…", "amount": "25000000", "nonce": 3, "deadline": 1794000000, "afterFill": 55120 }, "signature": "0x…" }
Submit it with withdraw(withdrawal, signature) on the settlement contract. See Funding.
  • withdrawal.amount is a decimal string.
  • withdrawal.nonce is the contract's withdrawal counter, not your request's nonce. The contract pays withdrawals in that order.
  • deadline is unix seconds, a week after the debit.
  • The contract pays once it has executed your fills up to afterFill.
If the withdrawal is not signed within 10 seconds, the answer is 202 with "pending": true. Fetch it later from GET /v1/withdrawals/{user}, matching requestNonce. A debit the engine refuses (INSUFFICIENT_CASH) is a 422.