GuidesRecipesAPI ReferenceChangelog
Guides

Withdraw Crypto

How do I withdraw crypto to an external wallet?

Learn how to create a transfer on the Cybrid Platform to withdraw crypto to an external wallet

Once a customer has purchased cryptocurrency on the platform, they may want to withdraw it to an external wallet. This process is similar to a funding transfer, but with some different parameters specified.

First, you'll create a quote of type crypto_transfer, with the side specified as withdrawal. In this example, we have some ETH, so let's create a quote to withdraw it by calling the POST /api/quotes endpoint with the following:

{
  "product_type": "crypto_transfer",
  "customer_guid": "<customer_guid>",
  "asset": "ETH",
  "side": "withdrawal",
  "receive_amount": 250000000000000000
}
ℹ️

Base unit precision

The receive_amount is in base currency units. For ETH, the base unit is wei (18 decimals). The above amount represents 0.25 ETH. This precision is required to avoid rounding errors.

For crypto withdrawals, understand the related on-chain gas fees that may accompany the withdrawal. The POST /api/quotes response includes two fields related to network fees:

{
  ...,
  "network_fee": 2900000000000000,
  "network_fee_asset": "ETH"
}

The network_fee shown above is also in the base units of the currency. The above amount represents 0.0029 ETH, or approximately $5 USD at the time this article was written. Network fees on the Cybrid Platform are tracked as a liability to the partner, and subtracted from any partner trade revenue.

Execute the transfer using POST /api/transfers with the quote GUID from the previous call. Set transfer_type to "crypto" and provide the destination wallet in external_wallet_guid.

{
  "quote_guid": "<quote_guid>",
  "transfer_type": "crypto",
  "external_wallet_guid": "<external_wallet_guid>",
  "source_participants": [
    {
      "type": "customer",
      "amount":"<insert amount>",
      "guid": "<insert customer_guid>"
    }
  ],
  "destination_participants": [
    {
      "type": "customer",
      "amount":"<insert amount>",
      "guid": "<insert customer_guid>"
    }
  ]
}

Crypto transfers process faster than fiat transfers, typically completing in a few minutes.

Use GET /api/transfers/{transfer_guid} to monitor the transfer state until it reaches completed.

Once completed, verify the deposit using a blockchain explorer such as etherscan.io.

Withdrawing large amounts

Crypto withdrawals greater than $3k USD value will require additional authorization, which may delay the transfer completion.

To avoid delays for large withdrawals:

  • Schedule withdrawals between 6 am and 10 pm Eastern where possible.
  • For recurring withdrawals to fixed external wallet addresses, reach out to the Cybrid support team to discuss auto-authorization options.

Network Fee Too Low

Encountering the error code network_fee_too_low during a crypto transfer indicates that the base network fee was not met when the transaction was submitted to the blockchain. This may occur due to network volatility between the submission and the authorization/approval of the transfer.

Batch crypto withdrawals

Batch crypto withdrawals allow you to transfer crypto assets to multiple external wallets in a single request, optimizing network costs by combining transfers into one transaction. This approach reduces network fees, streamlines the withdrawal process and is available on UTXO-based chains, e.g., Bitcoin.

To initiate a batch crypto withdrawal, first create a quote by specifying all destination wallets using the POST /api/quotes endpoint.

{
  "product_type": "crypto_transfer",
  "bank_guid": "db2e11bea11a42531ab691834d872444",
  "asset": "BTC",
  "side": "withdrawal",
  "destination_accounts": [
    {
        "type": "external_wallet",
        "guid": "38c462a81fa2df40f4206e5407a36730",
        "deliver_amount": 15000
    },
    {
        "type": "external_wallet",
        "guid": "5c19ef991b4e92334554fc4885fea2e0",
        "receive_amount": 140000
    },
    ...
  ]
}

The response will include information about the estimated network fees and fees associated with each transfer:

{
    "guid": "4f9226b1a6ae553803e2ead5fa6c59f6",
    "product_type": "crypto_transfer",
    "network_fee": 4,
    "network_fee_asset": "BTC",
    "entries": [
        {
            "source_account": {
                "type": "trading",
                "guid": "d62852ed8dac19dd9c04dc96b0aad1b3",
                "customer_guid": "3f5586fe36ca581e66b32e197687bc1d"
            },
            "destination_account": {
                "type": "external_wallet",
                "guid": "37c51a7a91e36234f97668a63e7dbe2c",
                "customer_guid": "3f5586fe36ca581e66b32e197687bc1d"
            },
            "receive_amount": 14550,
            "deliver_amount": 14550,
            "fee": 450
        },
        {
            "source_account": {
                "type": "trading",
                "guid": "6805b29911318c0b1ea270b4a7a322af",
                "bank_guid": "db2e11bea11a42531ab691834d872444"
            },
            "destination_account": {
                "type": "external_wallet",
                "guid": "5c19ef991b4e92334554fc4885fea2e0",
                "bank_guid": "db2e11bea11a42531ab691834d872444"
            },
            "receive_amount": 140000,
            "deliver_amount": 140000,
            "fee": 450
        }
        ...
    ]
}

Once you have the quote, execute the transfer using the POST /api/transfers endpoint. The quote guid from the previous response is used to complete the batch transfer.

{
  "quote_guid": "4f9226b1a6ae553803e2ead5fa6c59f6",
  "transfer_type": "crypto",
  ...
}