Skip to main content
GET
/
routes
List available routes for a pair
curl --request GET \
  --url https://api.leokit.dev/routes \
  --header 'Api-Key: <api-key>'
{
  "data": {
    "from_asset": "<string>",
    "to_asset": "<string>",
    "from_chain": "<string>",
    "to_chain": "<string>",
    "routes": [
      {
        "protocol": "<string>",
        "type": "cross-chain-dex",
        "estimated_seconds": 123,
        "is_intent_based": true,
        "requires_same_chain": true
      }
    ],
    "unsupported": [
      "<string>"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt

Use this file to discover all available pages before exploring further.

Overview

/leokit/routes returns the protocols that can swap a given from_assetto_asset pair, along with metadata for each (estimated time, intent-based or not, same-chain requirement). The response respects per-client disabled_protocols configured in the LeoKit Dashboard. Use this for UI like a “swap-via” picker, or to pre-filter protocols before requesting quotes.

Endpoint

GET /leokit/routes

Request

Authentication

Authentication is optional. With an Api-Key, the response is filtered by your client’s modularity settings (disabled protocols/chains). Without one, all globally-enabled protocols are returned.

Query Parameters

ParameterTypeRequiredDescription
from_assetstringYesSource asset in CHAIN.SYMBOL-ADDRESS format
to_assetstringYesDestination asset in CHAIN.SYMBOL-ADDRESS format

Response

Success (200)

{
  "data": {
    "from_asset": "ETH.ETH",
    "to_asset": "BTC.BTC",
    "from_chain": "ETH",
    "to_chain": "BTC",
    "routes": [
      {
        "protocol": "thorchain",
        "type": "cross-chain-dex",
        "estimated_seconds": 600,
        "is_intent_based": false,
        "requires_same_chain": false
      },
      {
        "protocol": "chainflip",
        "type": "cross-chain-dex",
        "estimated_seconds": 120,
        "is_intent_based": false,
        "requires_same_chain": false
      }
    ],
    "unsupported": ["oneinch"]
  }
}

Field Reference

FieldDescription
from_chainSource chain code (e.g. ETH)
to_chainDestination chain code (e.g. BTC)
routesArray of usable protocols for this pair
unsupportedProtocols that exist but can’t route this specific pair

Route Object

FieldTypeDescription
protocolstringProtocol slug (e.g. thorchain, chainflip, relay, near, harbor)
typestringcross-chain-dex, dex-aggregator, bridge, intent-bridge, or aggregator
estimated_secondsnumberAverage time-to-settle for this protocol
is_intent_basedbooleanTrue for solver-based intent protocols (Across, deBridge)
requires_same_chainbooleanTrue for protocols that only do same-chain swaps (e.g. 1inch). Cross-chain pairs unsupported

Caching

Responses are cached for 60 seconds (Cache-Control: public, max-age=60).

Errors

StatusCodeDescription
400BAD_REQUESTMissing from_asset or to_asset

Examples

Public request (all enabled protocols)

curl "https://api.leokit.dev/leokit/routes?from_asset=ETH.ETH&to_asset=BTC.BTC"

Authenticated request (filtered by client config)

curl -H "Api-Key: YOUR_API_KEY" \
  "https://api.leokit.dev/leokit/routes?from_asset=ETH.ETH&to_asset=BTC.BTC"

Notes

  • Protocol metadata is static per protocol — estimated_seconds is an average, not a real-time measurement.
  • Internal protocol variants (e.g. thorchain-aggregator-swapout) are filtered out of the response.
  • For full per-protocol live quotes, follow up with /leokit/quote or streaming quotes.

Authorizations

Api-Key
string
header
required

Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4

Query Parameters

from_asset
string
required
to_asset
string
required

Response

Routes for the pair.

data
object
required