Rango Docs
API SwaggerWidget PlaygroundAppWebsite
  • 👋Welcome to Rango
  • 🏠Introduction
  • 💁How It Works
  • ✅Integrations
  • ⚖️Rango vs. Competitors
  • 🔐Security
  • 🛣️Roadmap
  • 🦎Tokenomics
  • 💰Airdrop
  • ❓FAQ
  • 🐞Bug Bounty
  • API Integration
    • 🔡Terminology
    • 🚄API Key & Rate Limits
    • 🤝Choosing the Right API
    • 🦄Basic API - Single Step
      • 🛝API Flow
      • ⚙️API Reference
        • Get Blockchains & Tokens
        • Get Quote
        • Create Transaction (Swap)
        • Check Transaction Status
        • Check Approve Transaction Status
        • Get Address Assets & Balances
        • Get Token Balance
        • Report Transaction Failure
        • Get Direct Tokens
        • Get Custom Token
        • Message Passing
      • 🎓Tutorial
        • 🍰SDK Example
      • 💰Monetization
      • 🎹Sample Transactions
      • ✅Integration Checklist
    • 🦎Main API - Multi Step
      • 🛝API Flow
      • ⚙️API Reference
        • Get Blockchains & Tokens
        • Get Best Route
        • Get All Possible Routes
        • Confirm Route
        • Create Transaction
        • Check Transaction Status
        • Check Approve Transaction Status
        • Report Transaction Failure
        • Get Custom Token
        • Get Address Token Balance
      • 🎓Tutorial
        • 🍰SDK Example
      • 💰Monetization
      • 🎹Sample Transactions
  • ℹ️API Troubleshooting
  • Technical Docs
    • 🍔Swap Aggregation
    • 💰Monetization
    • ⛽Fee Structure
    • ⛽Network Fees and Gas Estimates
    • ⌛Stuck Transactions
  • Widget Integration
    • 🧩Overview
    • 🎇Quick Start
    • ⚙️Customization
    • 💰Monetization
    • 🛣️React Router
    • 🎵Events
    • 💳External Wallets
  • Smart Contracts
    • 👩‍💼Architecture
    • 🔎Audit Reports
    • 🏗️Deployment Addresses
    • 📩Message Passing
  • Ask for Integration
    • 🙋‍♂️DEXs & DEX Aggregators
    • 📱Rango Mobile SDK
  • Useful Links
    • Twitter
    • Discord Server
    • TG Announcements
    • TG Group
  • Terms of Use
  • Privacy policy
Powered by GitBook
On this page
  • Introduction
  • Basic API (Single-Step TX)
  • Main API (Multi-Step TXs)

Was this helpful?

  1. API Integration

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)

PreviousAPI Key & Rate LimitsNextBasic API - Single Step

Last updated 10 months ago

Was this helpful?

If you like multi-steps routes which you might already see in the , 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 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.)

🤝
🦄Basic API - Single Step
Rango dApp
swapping STARKNET.ETH to SOLANA.SOL
🦎Main API - Multi Step
Support all the blockchains
Swap Aggregation
Referral Support
Relaying arbitrary message
rango-sdk-basic
rango-sdk
https://github.com/rango-exchange/rango-sdk/tree/master/packages/rango-sdk-basic
https://github.com/rango-exchange/rango-sdk/tree/master/packages/rango-sdk
Sample multi-step route by Rango
npm: rango-sdk-basicnpm
npm: rango-sdknpm
Logo
Logo