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": "your-customer-guid",
"asset": "ETH",
"side": "withdrawal",
"receive_amount": 250000000000000000
}
Reminder that the receive_amount is in the base currency units. For ETH, that is in wei, which has 18 decimals. So the above amount represents 0.25 ETH. This level of precision is required to ensure there are no rounding errors.
For crypto withdraws it's important to understand any related on-chain gas fees that may be accompany the withdrawal. The response object from the POST /api/quotes endpoint will return two fields related to gas (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.
Now that we have our quote, we can head over to the POST /api/transfers endpoint to execute the transfer with the quote GUID received from the previous call. For this call, you'll specify the transfer_type as crypto, and supply the destination wallet in the external_wallet_guid.
{
"quote_guid": "your-quote-guid",
"transfer_type": "crypto",
"external_wallet_guid": "your-external_wallet_guid"
}
Crypto transfers happen much more quickly than fiat transfers, and it should only take a couple of minutes to process an on-chain transaction.
Similar to the funding process, you'll want to use the GET /api/transfers/{transfer_guid} endpoint to monitor the state of the transfer, until the transfer enters the completed state.
Once completed, you should be able to verify the deposit by leveraging a variety of 3rd party blockchain explorer tools, such as https://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.
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. As previously mentioned, you can request to add certain destination wallets to our allowlist, which auto-signs transactions under $50k USD (post-compliance approval). Our team is aware of this pain point and is prioritizing the development of a feature to fully automate crypto withdrawals, addressing these delays.
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",
...
}
Updated 27 days ago