Custodian
Withdraw

Withdraw

Send funds from your off-chain balance (activeBalance) to an external address. Estimate the fee first, then create the withdrawal. Supported on EVM and Tron networks. All endpoints require authentication.

Balance type: Withdrawals spend off-chain balance. The insufficient balance error means your activeBalance for that token is too low. Xellar then sends the tokens on-chain to the recipient address.

Estimate Withdraw

POST /api/v1/withdraws/estimate

Request Body

FieldTypeRequiredDescription
amountnumberYesAmount to withdraw
networkstringYesNetwork token code
recipientAddressstringYesDestination address
{
  "amount": 50,
  "network": "USDT",
  "recipientAddress": "0xdef..."
}

Response 200

{
  "data": {
    "amount": 50,
    "withdrawGasFee": 0.5,
    "withdrawTransactionFee": "exclusive",
    "netAmount": 49.5,
    "totalDeducted": 50.5,
    "networkTokenCode": "USDT",
    "network": "ethereum",
    "recipientAddress": "0xdef..."
  }
}
CodeMeaning
400Invalid amount/recipient/token, insufficient off-chain activeBalance, or fee exceeds amount

Create Withdraw

POST /api/v1/withdraws

Same body as estimate, plus optional reference (string).

Response 201

{
  "data": {
    "id": "wd_abc123",
    "amount": 50,
    "withdrawGasFee": 0.5,
    "withdrawTransactionFee": "exclusive",
    "netAmount": 49.5,
    "totalDeducted": 50.5,
    "amountInDecimals": "50000000",
    "networkTokenCode": "USDT",
    "network": "ethereum",
    "recipientAddress": "0xdef...",
    "reference": null,
    "status": "pending",
    "withdrawWalletId": "wal_1"
  }
}

status can be pending, success, failed, or canceled.

CodeMeaning
400Validation error or insufficient off-chain activeBalance
503MPC signing service unavailable

List Withdraws

GET /api/v1/withdraws

Query Parameters

ParamTypeDefaultDescription
pageint1Page number
limitint20Items per page
statusstringFilter by status
networkTokenCodestringFilter by token code
networkstringFilter by network

Response 200

{
  "data": {
    "items": [ /* withdraw objects */ ],
    "total": 10,
    "page": 1,
    "limit": 20
  }
}

Get Withdraw

GET /api/v1/withdraws/:id{ "data": { /* withdraw */ } }

CodeMeaning
404Withdraw not found