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
  • Connected Assets API
  • Connected Assets Request
  • Connected Assets Response

Was this helpful?

  1. API Integration
  2. Basic API - Single Step
  3. API Reference

Get Direct Tokens

List of all tokens which can be swapped from a given token

PreviousReport Transaction FailureNextGet Custom Token

Last updated 7 months ago

Was this helpful?

Connected Assets API

This is an experimental endpoint that you could use to find which tokens can be swapped from a given token using one single step transaction.

const connectedAssets = await rango.connectedAssets({
    from: {
        "blockchain": "ETH", 
        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
    }
})
const response = await axios.get('https://api.rango.exchange/basic/connected-assets', {
  params: {
    'from': 'ETH--0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    'apiKey': 'c6381a79-2817-4602-83bf-6a641a409e32'
  }
});
curl --request GET \
     --url 'https://api.rango.exchange/basic/connected-assets?from=ETH--0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&apiKey=c6381a79-2817-4602-83bf-6a641a409e32' 

Experimental API Warning

This experimental API provides a rough estimate of direct tokens available from each token. It is not recommended for general use unless you have a specific requirement that cannot be met with other methods. Typically, you can use the quote or swap methods directly without needing to check connected assets in advance.

Connected Assets Request

  • from* String

    • Example: ETH--0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

export type ConnectedAssetsRequest = {
  from: RequestedAsset
}

export type RequestedAsset = {
  blockchain: string
  address: string | null
  symbol: string
}

Connected Assets Response

Returns a list of blockchains + assets of that blockchain that is directly available. Note: If list of assets is empty, it means almost all tokens on this specific chain are accessible from the given token.

  • data

    • Description: List of all possible destination assets for the provided source asset.

export type ConnectedAssetsResponse = {
  data: ConnectedAsset[]
}

export type ConnectedAsset = {
  blockchain: string
  assets: Asset[]
}

export type Asset = {
  blockchain: string
  address: string | null
  symbol: string
}

This response indicates that the asset in request is nearly swappable with all assets on the ETH and BSC blockchains, but it only has a direct route to certain specific tokens on BOBA or EVMOS.

{
  "data": [
    {
      "blockchain": "ETH",
      "assets": []
    },
    {
      "blockchain": "BSC",
      "assets": []
    },
    {
      "blockchain": "BOBA",
      "assets": [
        {
          "blockchain": "BOBA",
          "symbol": "USDC",
          "address": "0x66a2a913e447d6b4bf33efbec43aaef87890fbbc"
        }
      ]
    },
    {
      "blockchain": "EVMOS",
      "assets": [
        {
          "blockchain": "EVMOS",
          "symbol": "CEUSDC",
          "address": "0xe46910336479f254723710d57e7b683f3315b22b"
        }
      ]
    }
  ]
}

Description: The which is going to be swapped into other assets.

🦄
⚙️
asset
Connected Assetsrango-exchange
Connected Assets Swagger
Logo