Skip to main content
POST
/
v2
/
clob
/
account
/
withdraw
curl -X POST https://api.pmx.trade/v2/clob/account/withdraw \
  -H "Content-Type: application/json" \
  -d '{ "pubkey": "7xKXabc123...", "amount": "50000000" }'
{
  "transaction": "AQAAAAAAA...base64...",
  "message": "Withdraw 50.000000 USDC from smart wallet"
}
Returns an unsigned Solana transaction that transfers USDC from your personal smart wallet back to your wallet. You can only withdraw up to your withdrawable balance (smart wallet balance minus amounts committed to open orders).

Request body

pubkey
string
required
The Solana wallet public key (base58-encoded).
amount
string
required
Amount of USDC to withdraw in raw units (6 decimals). For example, "50000000" = $50 USDC.

Response

transaction
string
Base64-encoded unsigned VersionedTransaction. Sign and submit to Solana.
message
string
Human-readable description of the transaction.
curl -X POST https://api.pmx.trade/v2/clob/account/withdraw \
  -H "Content-Type: application/json" \
  -d '{ "pubkey": "7xKXabc123...", "amount": "50000000" }'
{
  "transaction": "AQAAAAAAA...base64...",
  "message": "Withdraw 50.000000 USDC from smart wallet"
}

Errors

CodeHTTP StatusMeaning
INSUFFICIENT_WITHDRAWABLE400The requested withdraw amount exceeds your available (non-committed) smart wallet balance. Cancel open orders to free committed collateral.
{
  "error": "INSUFFICIENT_WITHDRAWABLE",
  "message": "Requested withdrawal of 50000000 exceeds withdrawable balance of 32500000. Cancel open orders to free committed collateral."
}
Check your withdrawable balance via GET /v2/clob/account/balances before withdrawing. USDC committed to open orders cannot be withdrawn until those orders are cancelled or filled.