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 at once. The debit is a payout record in the exchange's sequence: the settlement contract executes it in order with the fills before it, which moves the amount to owed(user), and collect(user) then sends it to the account's own address. The exchange calls collect for every payout it executes; anyone else may too. See Funding.
There is nothing to sign or submit on chain. The answer, once the exchange has numbered the payout:
200 OK
{ "pending": false, "requestNonce": 44, "amount": "25000000", "record": 55121, "paid": false }
FieldMeaning
requestNonceYour request's nonce: how you find this withdrawal again.
amountmicro-USDC, a decimal string.
recordThe payout's index in the sequence the contract executes, the numbering its lastFill() counts in; null until the exchange has numbered it.
pendingtrue until record is set.
paidtrue once the contract has executed through record: the amount is then in owed(user), and collect sends it on.
The row also carries withdrawal and signature, left from the signed withdrawal the contract no longer accepts; ignore them.
If the payout is not numbered within 10 seconds the answer is 202 with "pending": true; find it later in GET /v1/withdrawals/{user} by requestNonce.
  • A debit the engine refuses (INSUFFICIENT_CASH, or a nonce code) is a 422 whose error is the code.
  • A withdrawal over the declared large-withdrawal threshold that your cash less your deposits not yet at the chain's safe head does not cover is answered 202 with "held": true and a reason. The gateway holds it, unsequenced and its nonce unspent, and sends it once those deposits are safe.
  • GET /v1/withdrawals/{user} lists the account's withdrawals.
A withdrawal request costs one token of the address's signed rate.