Skip to content

Get Withdrawable Amounts

Query withdrawable amounts for one or more collateral symbols on the authenticated subaccount.

For multi-collateral wallets, the response includes one entry per requested collateral type. Both USDT and non-USDT collaterals (such as WETH) are returned. The totalWithdrawableUsdt field is the account-level USDT-denominated withdrawable budget from the margin snapshot — it is not a sum of the per-symbol items[].withdrawableAmount values.

Endpoint

POST https://papi.synthetix.io/v1/trade

Request

Request Format

{
  "params": {
    "action": "getWithdrawableAmounts",
    "subAccountId": "1867542890123456789",
    "symbols": ["USDT", "WETH"]
  },
  "expiresAfter": 1704153600,
  "signature": {
    "v": 28,
    "r": "0x19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef",
    "s": "0xabcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600"
  }
}

Request Parameters

ParameterTypeRequiredDescription
paramsobjectYesRequest parameters wrapper
params.actionstringYesMust be "getWithdrawableAmounts"
params.subAccountIdstringYesSubAccount ID to query
params.symbolsstring[]YesCollateral symbols to query. Must include 1–100 symbols. Supports USDT and non-USDT collaterals (e.g., "WETH").
ParameterTypeRequiredDescription
nonceuint64Yes*Positive integer nonce (must be incrementing and unique per request)
signatureobjectYesEIP-712 signature object
expiresAfteruint64NoUnix milliseconds expiration timestamp (5x rate limit on stale cancels)

:::info Common Parameters These are top-level request parameters. The subAccountId parameter is specified within the params object (see each endpoint's parameter table). :::

:::info SubAccountAction Endpoints Endpoints using SubAccountAction signing (getPositions, getOpenOrders, getOrderHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates, getWithdrawableAmounts, getFeeRate, getSnaxpotEpochTickets) do not require the nonce parameter. Only signature and optional expiresAfter are needed. :::

Response

Success Response

The following example shows a multi-collateral wallet with both USDT and WETH positions:

{
  "status": "ok",
  "response": {
    "items": [
      {
        "symbol": "USDT",
        "withdrawableAmount": "995.00",
        "quantity": "1000.00",
        "pendingWithdraw": "0",
        "withdrawFee": "5.00"
      },
      {
        "symbol": "WETH",
        "withdrawableAmount": "0.4975",
        "quantity": "0.5000",
        "pendingWithdraw": "0",
        "withdrawFee": "0.0025"
      }
    ],
    "totalWithdrawableUsdt": "2240.75"
  },
  "request_id": "5ccf215d37e3ae6d"
}

Response Fields

FieldTypeDescription
itemsarrayPer-collateral withdrawable amounts. One entry per symbol in the request.
items[].symbolstringCollateral symbol
items[].withdrawableAmountstringAmount currently withdrawable for this collateral, net of the withdrawal fee. "0" if the asset has no configured withdrawal fee.
items[].quantitystringCurrent collateral quantity held in the subaccount
items[].pendingWithdrawstringAmount already reserved for a pending withdrawal
items[].withdrawFeestringWithdrawal fee denominated in this collateral's own asset. "0" if the asset is not withdrawable.
totalWithdrawableUsdtstringAccount-level USDT-denominated withdrawable budget from the margin snapshot (max(0, AdjustedAccountValue − withdrawalRequirement)). Independent of which symbols appear in items.

Error Response

{
  "status": "error",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "At least one symbol is required"
  },
  "request_id": "5ccf215d37e3ae6d"
}

Implementation Notes

  • Uses SubAccountAction EIP-712 signing with action: "getWithdrawableAmounts"
  • symbols must be non-empty and cannot exceed 100 entries
  • Requests can return HTTP 400 when the account is in liquidation
  • All supported collateral types (USDT and non-USDT) can be queried in a single request
  • totalWithdrawableUsdt reflects the account-level margin withdrawable budget in USDT terms, not the sum of items[].withdrawableAmount
  • Batch requests fail entirely (zero items) if the collateral manager becomes unavailable during fee lookup; retry the full batch on batch-level errors

Signing

All trading methods are signed using EIP-712. Each successful trading request will contain:

  • A piece of structured data that includes the sender address
  • A signature of the hash of that structured data, signed by the sender

For detailed information on EIP-712 signing, see EIP-712 Signing.

Nonce Management

The nonce system prevents replay attacks and ensures order uniqueness:

  • Use any positive integer as nonce
  • Each nonce must be greater than the previous one (incrementing)
  • Date.now() is a convenient option, not a requirement
  • If nonce conflicts occur, increment by 1 and retry

:::note SubAccountAction Exception SubAccountAction endpoints (getPositions, getOpenOrders, getOrderHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates, getWithdrawableAmounts, getFeeRate, getSnaxpotEpochTickets) do not require a nonce. Only the signature and optional expiresAfter parameters are needed. :::

Error CodeDescriptionRetryable
UNAUTHORIZEDEIP-712 signature validation failedNo
VALIDATION_ERRORRequest validation failedNo
MISSING_REQUIRED_FIELDRequired field is missingNo
INVALID_FORMATField format is invalidNo
INVALID_VALUEInvalid parameter valueNo
RATE_LIMIT_EXCEEDEDToo many requests in time windowYes
INSUFFICIENT_MARGINNot enough margin for tradeNo
ORDER_NOT_FOUNDOrder does not existNo
OPERATION_TIMEOUTOperation timed outYes