šŸ¤Choosing the Right API

Choosing the Right API: A Tailored Comparison for Your Needs

Introduction

Rango API enables you to get the best cross-chain route for converting a token on the source blockchain to another token in the destination blockchain. It also enables dApps to relay an arbitrary message to the destination blockchain without any difficulties.

We have currently two versions of APIs / SDKs which are maintained and actively under development. Here is a brief comparison between them:

For almost all the scenarios, we recommend you to use Basic API except if you have a special requirement.

Feature
Basic API (Single-step TX)
Main API (Multi-step TXs)

āœ”

āœ”

āœ”

āœ”

āœ”

āœ”

āœ”

āœ”

Multi-Routing Support

āœ˜ (Not implemented yet)

āœ”

Pros. & Cons.

āœ” Only one TX needed

āœ” Better UX

āœ” Easier to integrate

āœ” Multi-Step Routes āœ˜ Multiple transactions are needed to be signed

āœ˜ May need the gas on the destination or middle networks

Routing (Price & Coverage)

āœ” Optimal price for 95% scenarios

āœ” Sub-optimal price for 5% scenarios

āœ” Covers 85% of routes

āœ” Best rates for all paths

SDK NPM Package

Github

To summarize, if you are only interested in single-step TXs or you want to use our message relaying features, you need to use Basic SDK. Otherwise, if you want the best rates for the price and like multi-steps routes, Multi Step SDK is suitable for you.

Basic API (Single-Step TX)

If you are only interested in one-step (single-tx) routes (one action by user), this is what you need.

Besides basic single step routes for the different blockchains (EVM, TRON, Solana, Cosmos, ...), it also supports aggregated cross-chain swaps for EVM blockchains in which users could perform a multistep route (dex-bridge-dex) in a single transaction.

It's a popular use case in the multi-chain areas to perform a cross-chain swap. By cross-chain swap, we mean: [DEX swap on source chain] + Bridge + [DEX swap on destination chain]

Main API (Multi-Step TXs)

If you like multi-steps routes which you might already see in the Rango dApp, this version of API/SDK is suitable for you.

As you see in the picture above, Rango API gives multiple routes with multiple steps to the user for swapping STARKNET.ETH to SOLANA.SOL and the user needs to sign at least one transaction for each step to complete this route. Users also need to have enough network fees on all middle chains. (If the route goes through some middle blockchains other than the source and the destination blockchains.)

Last updated