Withdraw Collateral
Withdraw collateral from your Synthetix trading account back to your wallet, subject to approval, margin requirements and risk checks.
Withdrawals are supported for any collateral type held in the subaccount — including USDT and non-USDT assets such as WETH or other supported collaterals. The withdrawal fee is denominated in the same asset being withdrawn (e.g., a WETH withdrawal incurs a fee in WETH, not USDT).
Endpoint
POST https://papi.synthetix.io/v1/tradeRequest
Request Format
{
"params": {
"action": "withdrawCollateral",
"subAccountId": "1867542890123456789",
"symbol": "USDT",
"amount": "1000.0",
"destination": "0x742d35Cc6634C0532925a3b8D371d1c62a39b6e2"
},
"nonce": 1704067200000,
"signature": {
"v": 28,
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
},
"expiresAfter": 1704067300
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | Action object containing withdrawal details |
params.action | string | Yes | Must be "withdrawCollateral" |
params.subAccountId | string | Yes | Subaccount identifier |
params.symbol | string | Yes | Collateral asset symbol to withdraw. Accepts any supported collateral (e.g., "USDT", "WETH"). |
params.amount | string | Yes | Amount to withdraw as decimal string (e.g., "1000.0") |
params.destination | string | Yes | Destination wallet address (0x-prefixed Ethereum address) |
nonce | integer | Yes | Positive integer, incrementing nonce |
signature | object | Yes | EIP-712 signature object |
expiresAfter | integer | No | Expiration timestamp in seconds (optional) |
:::warning Manager restriction
Manager wallets may only withdraw to the subaccount owner's wallet address (typically the Gnosis Safe). Attempting to withdraw to any other address returns HTTP 403 with error code forbidden and message "Managers may only withdraw to the owner's wallet address". See Smart Contract Accounts (Safe) for the full manager setup.
:::
Response
Success Response
{
"status": "ok",
"response": {
"requestId": "5ccf215d37e3ae6d",
"symbol": "USDT",
"amount": "1000.0",
"destination": "0x742d35Cc6634C0532925a3b8D371d1c62a39b6e2",
"timestamp": 0,
"withdrawTime": 0
},
"request_id": "5ccf215d37e3ae6d"
}Response Fields
| Field | Type | Description |
|---|---|---|
requestId | string | Echoes the client request_id from the response envelope for end-to-end correlation |
symbol | string | Asset symbol being withdrawn |
amount | string | Amount being withdrawn |
destination | string | Destination wallet address |
timestamp | integer | Deprecated — always returns 0 (pending removal) |
withdrawTime | integer | Withdrawal processing timestamp in milliseconds — currently returns 0 |
Error Response
{
"status": "error",
"error": {
"message": "Insufficient withdrawable balance",
"code": "VALIDATION_ERROR"
},
"request_id": "5ccf215d37e3ae6d",
"timestamp": 1735689900000
}Validation Rules
noncemust be a positive integer, incrementing and unique per requestsymbolmust be a valid collateral symbol supported by the account (e.g.,"USDT","WETH"). Non-USDT collaterals are supported provided they are held in the subaccount and have a configured withdrawal fee.amountmust be a positive number as stringamountmust not exceed the asset'sQuantityPrecisiondecimal places — queryPOST /v1/info (getAssets)to retrieve the allowed precision and round client-side before sendingdestinationmust be a valid Ethereum address (0x-prefixed)subAccountIdmust be a valid subaccount owned by or managed by the signing account- The requested collateral must be present on the account — if it is not, a
"collateral not found"error is returned before any balance or margin check is performed (see Error Handling) - Account must have sufficient withdrawable balance of the specified asset
- Withdrawal must not violate margin requirements
- Owners may withdraw to any valid Ethereum address
- Managers may only withdraw to the subaccount owner's wallet address; any other destination returns HTTP 403
- Delegate addresses cannot initiate withdrawals
EIP-712 Signature Structure
The withdrawal request fields are signed using EIP-712:
WithdrawCollateral Type Definition
const WithdrawCollateralTypes = {
WithdrawCollateral: [
{ name: "subAccountId", type: "uint256" },
{ name: "symbol", type: "string" },
{ name: "amount", type: "string" },
{ name: "destination", type: "address" },
{ name: "nonce", type: "uint256" },
{ name: "expiresAfter", type: "uint256" }
]
}Example Typed Data for WithdrawCollateral
{
"types": {
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint256" },
{ "name": "verifyingContract", "type": "address" }
],
"WithdrawCollateral": [
{ "name": "subAccountId", "type": "uint256" },
{ "name": "symbol", "type": "string" },
{ "name": "amount", "type": "string" },
{ "name": "destination", "type": "address" },
{ "name": "nonce", "type": "uint256" },
{ "name": "expiresAfter", "type": "uint256" }
]
},
"primaryType": "WithdrawCollateral",
"domain": {
"name": "Synthetix",
"version": "1",
"chainId": 1,
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"message": {
"subAccountId": "1867542890123456789",
"symbol": "USDT",
"amount": "1000.0",
"destination": "0x742d35Cc6634C0532925a3b8D371d1c62a39b6e2",
"nonce": 1704067200000,
"expiresAfter": 1704067300
}
}Important Notes:
- The
amountfield is a string type and should match the decimal representation from the request (e.g.,"1000.0") - The
expiresAfterfield should match the request value, or be set to0when not provided (representing no expiration) - The
noncefield is included in the EIP-712 message and matches the top-level request field - Withdrawals must be signed by the subaccount owner or a wallet-level manager; delegated signers cannot initiate withdrawals
- For testnet, use
chainId: 11155111(Ethereum Sepolia). See Environments for complete configuration details
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 Handling
Common error scenarios:
| Error Code | Description | Retryable |
|---|---|---|
UNAUTHORIZED | EIP-712 signature validation failed | No |
VALIDATION_ERROR | Request validation failed | No |
MISSING_REQUIRED_FIELD | Required field is missing | No |
INVALID_FORMAT | Field format is invalid | No |
INVALID_VALUE | Invalid parameter value | No |
RATE_LIMIT_EXCEEDED | Too many requests in time window | Yes |
INSUFFICIENT_MARGIN | Not enough margin for trade | No |
ORDER_NOT_FOUND | Order does not exist | No |
OPERATION_TIMEOUT | Operation timed out | Yes |
| Error | Description |
|---|---|
collateral not found: {asset} | The requested collateral is not present in the subaccount. This check occurs before any balance or margin evaluation. |
| Insufficient withdrawable balance | Account lacks required funds for the specified asset |
| Margin requirement violation | Withdrawal would violate margin rules |
| Invalid asset symbol | Asset type not supported as collateral |
| Account health check failed | Withdrawal would make account unhealthy |
| Delegate signature not allowed | Must be signed by account owner or manager |
Managers may only withdraw to the owner's wallet address (HTTP 403, code forbidden) | Manager destination does not match the subaccount owner's wallet address |
| Minimum withdrawal amount | Amount below minimum threshold |
withdrawal quantity for {asset} does not conform to quantity tick size (allowed precision: {n} decimal places) | amount has more decimal places than the asset's QuantityPrecision; round client-side using POST /v1/info (getAssets) |
withdrawal amount must be positive for {asset} | amount is zero or rounds to zero |
withdrawals are not supported for {asset} | Asset does not have a configured withdrawal fee and cannot be withdrawn |
:::note Error Precedence
The missing-collateral check (collateral not found: {asset}) is evaluated before the withdrawable-amount and margin checks. If a request specifies a collateral symbol that is not present on the account, this error is returned immediately without computing the withdrawable balance.
:::
Related
- Deposits - How to deposit collateral into your account
- Get Balance Updates - View deposit and withdrawal history
- Get Subaccount - Check current balances and margin status
- Get Withdrawable Amounts - Query per-asset withdrawable amounts before initiating a withdrawal