Request a withdrawal
Endpoint
POST /exchange
Selector: action.type: "requestWithdrawal"
Purpose
Reserve an owner-authorized USDC payout on HyperEVM. Reservation does not confirm payment.
Authorization
Owner only. Sign the WithdrawalIntent; trading and read agents cannot authorize payouts.
Request fields
| Field | Type | Required | Meaning |
|---|---|---|---|
action | Object | Yes | The withdrawal action described below. |
action.type | String | Yes | "requestWithdrawal". |
action.intent | Object | Yes | The exact owner-signed withdrawal intent. |
action.intent.withdrawalId | 32-byte hex string | Yes | Identity of the withdrawal request. |
action.intent.owner | Address | Yes | Owner of the customer account. |
action.intent.recipient | Address | Yes | Payout recipient. |
action.intent.asset | Address | Yes | Deployment's canonical HyperEVM USDC token. |
action.intent.amount | Positive unsigned integer | Yes | Six-decimal USDC atomic units. |
action.intent.maxFee | Unsigned integer | Yes | Maximum fee in the same USDC units. |
action.intent.destination | Integer | Yes | 0 for the normal HyperEVM USDC payout route. |
action.intent.nonce | 32-byte hex string | Yes | Withdrawal-intent nonce, separate from the native trading nonce. |
action.intent.deadline | Unsigned integer | Yes | Intent deadline in Unix seconds. |
signature | Hex string | Yes | Canonical 65-byte owner signature with recovery byte 27 or 28. |
Request example
All addresses, proof bytes and identifiers below are dummy values. The asset value is not a token deployment address.
{
"action": {
"type": "requestWithdrawal",
"intent": {
"withdrawalId": "0x0101010101010101010101010101010101010101010101010101010101010101",
"owner": "0x1111111111111111111111111111111111111111",
"recipient": "0x2222222222222222222222222222222222222222",
"asset": "0x3333333333333333333333333333333333333333",
"amount": 1000000,
"maxFee": 1000,
"destination": 0,
"nonce": "0x4444444444444444444444444444444444444444444444444444444444444444",
"deadline": 1796253600
}
},
"signature": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
}Response fields
| Field | Meaning |
|---|---|
status | "ok" for an accepted request or "err" for a rejected request. |
response | Response object on acceptance; a rejection string otherwise. |
response.type | "withdrawal" for the withdrawal response. |
response.data.withdrawalId | Identity of the withdrawal request. |
response.data.status.type | "reserved" for an initially reserved request. |
A rejected request uses {"status":"err","response":"invalid or unavailable withdrawal"}. The request response records acceptance and state, not receipt of funds by the recipient. The withdrawalStatus query tracks later processing.
Response example
An initially reserved request has this shape:
{
"status": "ok",
"response": {
"type": "withdrawal",
"data": {
"withdrawalId": "0x0101010101010101010101010101010101010101010101010101010101010101",
"status": {
"type": "reserved"
}
}
}
}Constraints
The normal payout route uses action.intent.destination: 0 and the deployment's canonical HyperEVM USDC token. 1 USDC is 1,000,000 atomic units.
Amount and maximum fee are reserved. The deadline does not release an accepted reservation.
Payment requires enclave authorization, reconciled backing and a confirmed payout. Withdrawal flow.