Skip to content
LogoLogo

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

FieldTypeRequiredMeaning
actionObjectYesThe withdrawal action described below.
action.typeStringYes"requestWithdrawal".
action.intentObjectYesThe exact owner-signed withdrawal intent.
action.intent.withdrawalId32-byte hex stringYesIdentity of the withdrawal request.
action.intent.ownerAddressYesOwner of the customer account.
action.intent.recipientAddressYesPayout recipient.
action.intent.assetAddressYesDeployment's canonical HyperEVM USDC token.
action.intent.amountPositive unsigned integerYesSix-decimal USDC atomic units.
action.intent.maxFeeUnsigned integerYesMaximum fee in the same USDC units.
action.intent.destinationIntegerYes0 for the normal HyperEVM USDC payout route.
action.intent.nonce32-byte hex stringYesWithdrawal-intent nonce, separate from the native trading nonce.
action.intent.deadlineUnsigned integerYesIntent deadline in Unix seconds.
signatureHex stringYesCanonical 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

FieldMeaning
status"ok" for an accepted request or "err" for a rejected request.
responseResponse object on acceptance; a rejection string otherwise.
response.type"withdrawal" for the withdrawal response.
response.data.withdrawalIdIdentity 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.