Skip to content
SwapWalletDocs
فارسیGet an API key

Crypto withdrawals

A crypto withdrawal sends a token from your balance to an address outside SwapWallet. It takes two calls:

  1. Retrieve withdrawal settings for the token: which networks are open, the withdrawal fee on each, the minimum and maximum, and whether the network takes a memo.
  2. Create a crypto withdrawal with the amount, network and address.

The withdrawal starts as PENDING and turns SUCCEED once the network confirms it. Follow it with Retrieve a transaction.

Balance and limit errors (INSUFFICIENT_USER_BALANCE, USER_DO_NOT_CONSIDER_NETWORK_FEE, LIMIT_DAILY_WITHDRAW_EXCEEDED, LIMIT_MONTHLY_WITHDRAW_EXCEEDED, USER_BALANCE_LOCKED) carry one more field, error.suggestionAmount: the most you can withdraw right now, as a Money object.

Trades settle instantly, and crypto in your balance can usually be withdrawn right away. The one exception: crypto bought with Toman deposited in the last 72 hours. The part of it above your account’s instant-withdrawal credit can be withdrawn 72 hours after that deposit. Until then, a request that needs it fails with USER_BALANCE_LOCKED, and suggestionAmount shows how much you can withdraw now. Crypto deposited from outside, and older balances, are never held.

The Withdrawal settings object

How one token can be withdrawn on one network.

Attributes

  • networkenumRequired

    The network.

    Possible values

    • TRON
    • ETHEREUM
    • BSCBNB Smart Chain.
    • TON
    • POLYGON
    • ARBITRUM
    • AVALANCHE
    • OPTIMISM
    • SOLANA
    • FANTOM
    • SUI
    • DOGE
    • BTC
    • ADA
    • XRP
    • NEAR
  • withdrawFeeMoneynullable

    SwapWallet’s withdrawal fee on this network, in the token itself. null when withdrawals on this network are closed.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • minWithdrawMoneynullable

    Smallest amount you can withdraw. null when there is no minimum.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • maxWithdrawMoneynullable

    Largest amount per withdrawal. null when there is no network maximum; your account limits still apply.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • withdrawEnabledbooleanRequired

    Whether you can withdraw this token on this network right now.

  • supportMemobooleanRequired

    Whether the network takes a memo (tag). Send memo only when this is true.

The Withdrawal settings object
{
  "network": "BSC",
  "withdrawFee": {
    "number": "0.5",
    "unit": "USDT"
  },
  "minWithdraw": {
    "number": "2",
    "unit": "USDT"
  },
  "maxWithdraw": {
    "number": "50000",
    "unit": "USDT"
  },
  "withdrawEnabled": true,
  "supportMemo": false
}

The Crypto withdrawal transaction

A Transaction object with type CRYPTO_WITHDRAW. These are its fields; cryptoWithdraw holds the details.

Attributes

  • idintegerRequired

    Transaction ID. Unique across all types.

  • supportCodestringRequired

    Code to quote to support, such as SW-K7NP2QR-MXVT.

  • timestampintegerRequired

    When SwapWallet recorded the transaction, in Unix milliseconds. For a crypto deposit, the time it was credited, not its block time.

  • typeenumRequired

    Always CRYPTO_WITHDRAW.

    Possible values

    • CRYPTO_WITHDRAW
  • statusenumRequired

    Where the withdrawal stands.

    Possible values

    • PENDINGNot yet confirmed on the network.
    • SUCCEEDConfirmed on the network.
  • networkenumRequired

    The network it was sent on.

    Possible values

    • TRON
    • ETHEREUM
    • BSCBNB Smart Chain.
    • TON
    • POLYGON
    • ARBITRUM
    • AVALANCHE
    • OPTIMISM
    • SOLANA
    • FANTOM
    • SUI
    • DOGE
    • BTC
    • ADA
    • XRP
    • NEAR
  • exchangeFeeMoneyRequired

    The withdrawal fee charged.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • cryptoWithdrawobjectRequired

    Withdrawal details.

    Show child attributesHide child attributes
    • amountMoneyRequired

      Amount sent to the destination address.

      Show child attributesHide child attributes
      • numberdecimal stringRequired

        The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

      • unitstringRequired

        The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

    • valueMoneyRequired

      Value in US dollars (USD) at the time of the transaction.

      Show child attributesHide child attributes
      • numberdecimal stringRequired

        The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

      • unitstringRequired

        The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

    • userCurrencyValueMoneyRequired

      The same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.

      Show child attributesHide child attributes
      • numberdecimal stringRequired

        The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

      • unitstringRequired

        The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

    • contractenum

      The token standard on the network. Left out for a network's own coin, such as TRX on Tron.

      Possible values

      • TRC20Tron token.
      • ERC20Ethereum, Arbitrum or Polygon token.
      • BEP20BNB Smart Chain token.
      • JETTONTON token.
      • SPLSolana token.
    • sourceAddressstring

      SwapWallet’s sending address. Left out until the withdrawal is sent.

    • destinationAddressstringRequired

      The address you withdrew to.

    • hashstring

      Transaction hash on the network. Left out until the withdrawal is sent.

    • memostring

      The memo sent with the withdrawal. Left out when there is none.

    • blockScanUrlstring

      Link to the transaction on a block explorer. Left out until the withdrawal is sent.

    • workflowarray of objectsRequired

      The withdrawal’s progress, one entry per step, always in this order.

      Show child attributesHide child attributes
      • stepenumRequired

        The step.

        Possible values

        • TRANSACTION_CREATEDThe request was recorded and the amount taken from your balance.
        • ACCEPTED_BY_ADMINApproved for sending, automatically or after a review.
        • PUBLISHED_TO_NETWORKSent to the network; hash is now set.
        • CONFIRMED_BY_NETWORKConfirmed on the network. The transaction’s status turns SUCCEED.
      • donebooleanRequired

        Whether the step is complete.

      • dateISO 8601 timestampnullable

        When the step completed. null until then.

The Crypto withdrawal transaction
{
  "id": 3052410,
  "supportCode": "SW-T2KD8WQ-HN4R",
  "timestamp": 1795168932000,
  "type": "CRYPTO_WITHDRAW",
  "status": "PENDING",
  "network": "BSC",
  "exchangeFee": {
    "number": "0.5",
    "unit": "USDT"
  },
  "cryptoWithdraw": {
    "amount": {
      "number": "200",
      "unit": "USDT"
    },
    "value": {
      "number": "200",
      "unit": "USD"
    },
    "userCurrencyValue": {
      "number": "54480000",
      "unit": "IRT"
    },
    "contract": "BEP20",
    "destinationAddress": "0x8f3a2b6c9d1e4f7a0b3c6d9e2f5a8b1c4d7e0f3a",
    "workflow": [
      {
        "step": "TRANSACTION_CREATED",
        "done": true,
        "date": "2026-11-20T10:02:12.204871Z"
      },
      {
        "step": "ACCEPTED_BY_ADMIN",
        "done": false,
        "date": null
      },
      {
        "step": "PUBLISHED_TO_NETWORK",
        "done": false,
        "date": null
      },
      {
        "step": "CONFIRMED_BY_NETWORK",
        "done": false,
        "date": null
      }
    ]
  }
}

Retrieve withdrawal settings

GET/v1/wallet/crypto-withdraw/config/{token}

Returns, for each network that carries the token, whether withdrawals are open, the withdrawal fee, the minimum and maximum amount, and whether a memo is accepted. Call it before every withdrawal: fees and open networks change.

The withdrawal fee covers more than the network’s own cost, so it can differ from what a block explorer shows.

Path parameters

  • tokenstringRequired

    Token symbol, such as USDT or TON.

Returns

Returns an array of Withdrawal settings objects in result, one per network.

Errors

  • 400INVALID_REQUEST_PARAMETER

    token isn’t a token SwapWallet knows.

GET/v1/wallet/crypto-withdraw/config/{token}
curl https://swapwallet.app/api/v1/wallet/crypto-withdraw/config/USDT \
  -H "Authorization: Bearer $SWAPWALLET_API_KEY"
Response
{
  "status": "OK",
  "result": [
    {
      "network": "TRON",
      "withdrawFee": {
        "number": "4.9",
        "unit": "USDT"
      },
      "minWithdraw": {
        "number": "5",
        "unit": "USDT"
      },
      "maxWithdraw": {
        "number": "50000",
        "unit": "USDT"
      },
      "withdrawEnabled": true,
      "supportMemo": false
    },
    {
      "network": "BSC",
      "withdrawFee": {
        "number": "0.5",
        "unit": "USDT"
      },
      "minWithdraw": {
        "number": "2",
        "unit": "USDT"
      },
      "maxWithdraw": {
        "number": "50000",
        "unit": "USDT"
      },
      "withdrawEnabled": true,
      "supportMemo": false
    },
    {
      "network": "TON",
      "withdrawFee": null,
      "minWithdraw": {
        "number": "1",
        "unit": "USDT"
      },
      "maxWithdraw": null,
      "withdrawEnabled": false,
      "supportMemo": true
    }
  ]
}

Create a crypto withdrawal

POST/v1/wallet/crypto-withdraw

Withdraws a token from your balance to an address on the network you choose. The amount and the fee leave your balance at once, and the withdrawal is sent to the network after approval.

Pass fee from the settings: if the fee has changed since, the request fails instead of charging the new fee. The same withdrawal sent twice within 10 seconds is refused as a duplicate.

If address is the deposit address of a SwapWallet payment invoice, that invoice is paid from your balance instead, and the response is a PAYMENT transaction.

Body parameters

  • amountMoneyRequired

    How much to withdraw, in the token being withdrawn. unit picks the token.

    Between minWithdraw and maxWithdraw from the settings

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • networkenumRequired

    Network to send on. It must carry the token and have withdrawEnabled.

    Possible values

    • TRON
    • ETHEREUM
    • BSCBNB Smart Chain.
    • TON
    • POLYGON
    • ARBITRUM
    • AVALANCHE
    • OPTIMISM
    • SOLANA
    • FANTOM
    • SUI
    • DOGE
    • BTC
    • ADA
    • XRP
    • NEAR
  • addressstringRequired

    Destination address on that network.

  • feeMoneynullable

    The withdrawal fee you expect, from withdrawFee in the settings. If it doesn’t match the current fee, the request fails with TRANSACTION_FEE_HAS_CHANGED. Recommended.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • feeDeductTypeenumnullable

    Where the withdrawal fee comes from.

    Default: EXTERNAL

    Possible values

    • EXTERNALFrom your balance, on top. The address receives amount; your balance goes down by amount + fee.
    • INTERNALOut of amount. The address receives amount − fee; your balance goes down by amount.
  • memostringnullable

    Memo or tag for the destination, if it needs one (exchanges often do on TON). Only on networks with supportMemo; elsewhere the request fails.

  • remarkstringnullable

    A private note for your own records. Saved on the transaction in the app; never sent to the network.

Returns

Returns the Crypto withdrawal transaction in result, with status PENDING.

Errors

  • 400INSUFFICIENT_USER_BALANCE

    Your balance doesn’t cover the withdrawal.

  • 400USER_DO_NOT_CONSIDER_NETWORK_FEE

    Your balance covers amount but not amount + the withdrawal fee.

  • 400LIMIT_DAILY_WITHDRAW_EXCEEDED

    Over your daily withdrawal limit.

  • 400LIMIT_MONTHLY_WITHDRAW_EXCEEDED

    Over your monthly withdrawal limit.

  • 400USER_BALANCE_LOCKED

    The withdrawal needs crypto bought with Toman deposited in the last 72 hours, above your instant-withdrawal credit. That part can be withdrawn 72 hours after the deposit.

  • 400TRANSACTION_FEE_HAS_CHANGED

    fee doesn’t match the current withdrawal fee. Get the settings again.

  • 400WITHDRAW_AMOUNT_IS_LESS_THAN_MINIMUM

    amount is below minWithdraw.

  • 400WITHDRAW_AMOUNT_IS_MORE_THAN_MAXIMUM

    amount is above maxWithdraw.

  • 400INVALID_AMOUNT

    With INTERNAL, amount doesn’t exceed the fee.

  • 400INVALID_ADDRESS_FORMAT

    address isn’t a valid address on this network.

  • 400INVALID_NETWORK

    address belongs to a SwapWallet account. Send to SwapWallet users by transfer in the app instead.

  • 400MEMO_NOT_SUPPORTED

    memo was sent for a network that doesn’t take one.

  • 404INVALID_TOKEN_ENUM

    The network doesn’t carry this token.

  • 400CRYPTO_WITHDRAW_IS_DISABLED

    Crypto withdrawals are paused for now.

  • 400DUPLICATE_WITHDRAW

    The same withdrawal was made less than 10 seconds ago.

POST/v1/wallet/crypto-withdraw
curl -X POST https://swapwallet.app/api/v1/wallet/crypto-withdraw \
  -H "Authorization: Bearer $SWAPWALLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": {
    "number": "200",
    "unit": "USDT"
  },
  "network": "BSC",
  "address": "0x8f3a2b6c9d1e4f7a0b3c6d9e2f5a8b1c4d7e0f3a",
  "fee": {
    "number": "0.5",
    "unit": "USDT"
  },
  "feeDeductType": "EXTERNAL",
  "remark": "Supplier invoice 1043"
}'
Response
{
  "status": "OK",
  "result": {
    "id": 3052410,
    "supportCode": "SW-T2KD8WQ-HN4R",
    "timestamp": 1795168932000,
    "type": "CRYPTO_WITHDRAW",
    "status": "PENDING",
    "network": "BSC",
    "exchangeFee": {
      "number": "0.5",
      "unit": "USDT"
    },
    "cryptoWithdraw": {
      "amount": {
        "number": "200",
        "unit": "USDT"
      },
      "value": {
        "number": "200",
        "unit": "USD"
      },
      "userCurrencyValue": {
        "number": "54480000",
        "unit": "IRT"
      },
      "contract": "BEP20",
      "destinationAddress": "0x8f3a2b6c9d1e4f7a0b3c6d9e2f5a8b1c4d7e0f3a",
      "workflow": [
        {
          "step": "TRANSACTION_CREATED",
          "done": true,
          "date": "2026-11-20T10:02:12.204871Z"
        },
        {
          "step": "ACCEPTED_BY_ADMIN",
          "done": false,
          "date": null
        },
        {
          "step": "PUBLISHED_TO_NETWORK",
          "done": false,
          "date": null
        },
        {
          "step": "CONFIRMED_BY_NETWORK",
          "done": false,
          "date": null
        }
      ]
    }
  }
}