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.

On per_wallet apps you must pass walletId (the deposit wallet whose ledger to debit). On per_app apps omit walletId.

Estimate Withdraw

POST /api/v1/withdraws/estimate

Request Body

FieldTypeRequiredDescription
amountnumberYesAmount to withdraw
networkstringYesNetwork token code
recipientAddressstringYesDestination address
walletIdstringConditionalDeposit wallet UUID. Required for per_wallet apps; must not be sent for per_app
{
  "amount": 50,
  "network": "USDT",
  "recipientAddress": "0xdef...",
  "walletId": "wal_1"
}

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). For per_wallet apps, walletId is required on create as well.

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_hot",
    "walletId": "wal_1"
  }
}

walletId is the deposit / ledger wallet deducted on per_wallet apps (omitted for per_app). withdrawWalletId is the hot wallet that broadcasts the on-chain transfer.

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

CodeMeaning
400Validation error, missing/invalid walletId, 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
walletIdstringFilter by ledger wallet (per_wallet)

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