1inch’s swap API for Binance Smart Chain
Following a recent integration with BSC, 1inch released an API for swaps in the network.
1inch’s swap API for Binance Smart Chain (BSC) is a cutting-edge aggregating solution, offering the chain’s users high transaction speed and the best swap rates on the market.
The API finds the most efficient token swap paths, splitting swaps between different protocols and even different market depts within one protocol. It also builds call data to be sent to the blockchain.
Basically, in one smart contract invocation, discovered paths are transformed into call data, enabling a user to immediately do a swap at the best rate.
One of the API’s main advantages is its extremely short median response time — less than 400ms.
The API can easily be integrated with any dApp or a bot, and integrators can collect fees from users’ swaps.
In addition, the API is very easy to use:const bnb = ‘0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE’;const busd = ‘0xe9e7cea3dedca5984780bafc599bd69add087d56’;const response = await fetch(`https://api.1inch.exchange/v3.0/56/quote?fromTokenAddress=${bnb}&toTokenAddress=${busd}&amount=1000000000000000000`);const quote = await response.json();console.log(‘Quote: , quote);
Some useful links: 1inch API documentation, 1inch API for Binance Smart Chain, 1inch API for Ethereum.
Currently, the API supports the following protocols on BSC:
- PancakeSwap
- WBNB
- Venus
- StreetSwap
- BakerySwap
- 1inch Liquidity Protocol
- JulSwap
- ACryptoS
- DODO
- ApeSwap
- Spartan Protocol
And this list is constantly expanding, so, stay tuned!
Recent Posts
How AI is powering the next wave of cyber threats in Web3
AI is raising the quality and scale of Web3 phishing, impersonation and scam automation, which is changing how signature based attacks are carried out.
St. Moritz set the tone. Now Davos must set the direction for crypto
Orest Gavryliak, 1inch Chief Legal Officer, recently attended the CFC St. Moritz Industry Days. In this post, he highlights key themes that emerged there and are likely to resonate at this week’s World Economic Forum Annual Meeting in Davos.
Rewardy Wallet integrates the 1inch Swap API to offer users efficient crypto swaps
The integration enables Rewardy Wallet users to swap tokens across Ethereum, BNB Chain and other chains, paying gas fees with RWD tokens.