How to test Withdrawals?


I’m working on a feature that will swap an asset between a native chain and Binance Chain (back and forth). I thought of two approaches and would love feedback

  1. Use the bridge API
  2. Send the asset to Binance exchange and use the withdraw api to specify the network I want to withdraw to

The challenge I run into is how to test either option? I couldn’t find a testnet Bridge, and I read here that SPOT testnet does not support the withdraw API (sapi endpoints)

Hi @LinkedGh, unfortunately there’s not much we can help at the moment, indeed no test environment is available for /sapi/v1/capital/withdraw/apply without paying the transaction fee.

@aisling I feared as much. Thank you.

When I look at the /sapi/v1/capital/withdraw/apply payload, I wonder about a couple of the undocumented fields.

  • amount - does 1 mean 1 whole coin? So if I’m withdrawing ETH, it would be 1 ETH, and if I’m withdrawing BTC, it would be 1 BTC?
  • network - Where do I find the possible values? For my use cases I assume ETH, BTC, and BNB are the values
  • coin - Same as before; is there an endpoint or a doc that will show me available COIN values and their available NETWORK values?

If this should be a separate question, let me know and I’ll post it.

Perhaps the query result - Binance API Documentation will help you