Skip to main content

Buy any token (Swap)

For crypto currencies not listed on Binance spot (such as popular memecoins), Binance Connect provides a suite of flexible and powerful APIs, through which you can quickly buy any token with one click!

Its implementation principle is as follows, there are two steps:

  1. First buy the bridge token with fiat currency, such as USDT, USDC, BNB, SOL, etc. The bridge token is automatically selected based on the liquidity of different networks and providers, and it may be the native token of the current chain or stable coins;
  2. Then swap the target token (such as memecoins) by the bridge token;

As a partner (client), you don't need to pay much attention to these implementation details. These two steps are happened automatically in Binance Connect, and users will not realize any unsmooth of this process. The whole user experience is to buy any token with one click.

If you are going to integrate the "Buy any token" capability, it's quite easy. You only need to call the APIs in the following:

  • Get payment method list. If there is success response and results of the API, it means that Binance Connect supports this token (contract address);
  • Get estimated quote. If there is success response and result of the API, it means that there is quote and liquidity of this token (contract address), and it's fine to call the pre-order API to place an order;
  • Pre order.

In fact, these APIs are no different from the APIs in the On-ramp (Buy) section. The only difference is that On-ramp (Buy) requires the parameter cryptoCurrency, while the parameter for Buy any token is contractAddress.