Rango Exchanges offers two APIs: the Single-Step (Basic API) and the Multi-Step (Main API). Since Rango supports swap aggregation in EVM and (soon) Cosmos by batching multiple transactions into one, we recommend using the Basic API for most scenarios to ensure a seamless integration. The Basic API is designed to provide a straightforward integration experience, unless you have specific and unique requirements that necessitate the use of the Main API.
In this tutorial series, we'll show you how to integrate Rango Exchange Basic API/SDK and address common questions that dApps often encounter.
You could also check our swagger link to play with API endpoints parameters that are mentioned during this guide.
To start integrating, you must get your dedicated public API key. Our service is currently free. But to use our API or SDK, you need to request an API key, describing your dApp, the blockchains you like to connect to, and your dApp domain if it's a website to enable CORS headers for your API key.
We have predefined rate limits for each API key, providing a default usage threshold. However, if your requirements exceed these limits, we are open to leveling up the rate limits to accommodate your specific needs. Just let us know your usage demands, and we'll work with you to adjust the rate limits accordingly.
Install JS SDK (if needed)
If you decide not to use our TypeScript SDK and prefer integration in other programming languages, feel free to skip this step.
To integrate Rango SDK inside your dApp or wallet, you need to install rango-basic-sdk using npm or yarn.
Then you need to instantiate RangoClient and use it in the next steps.