Skip to main content
GET
/
getPaths
Get Paths
curl --request GET \
  --url https://api-v2.swaps.xyz/api/getPaths \
  --header 'x-api-key: <api-key>'
{
  "srcChainId": 123,
  "srcToken": {
    "chainId": 123,
    "address": "<string>",
    "name": "<string>",
    "symbol": "<string>",
    "decimals": 123,
    "isNative": true,
    "minAmount": "<string>",
    "maxAmount": "<string>",
    "logo": "<string>",
    "swapsXyzCode": "<string>"
  },
  "paths": [
    {
      "chainId": 123,
      "supportsExactAmountIn": true,
      "supportsExactAmountOut": true,
      "amountLimits": {
        "minAmount": "<string>",
        "maxAmount": "<string>"
      }
    }
  ],
  "timestamp": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.swaps.xyz/llms.txt

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

Authorizations

x-api-key
string
header
required

Limited demo key for API Reference: 5c951bc81da566bbd030ba8e20724063.

Query Parameters

srcChainId
integer
required

Source chain ID Chain ID. Find in the list of supported networks.

srcToken
string
required

Source token address

dstChainId
integer

Recommended: destination chain ID Chain ID. Find in the list of supported networks.

dstToken
string

Recommended: destination token address

excludeBridgeIds
string[]

Bridge IDs to exclude from routing

Bridge protocol identifier (e.g. "across", "relay", "mayan").

excludeDexIds
string[]

DEX IDs to exclude from routing

DEX identifier (depends on integration)

Response

Paths response

srcChainId
integer
required

The source chain ID

srcToken
object
required

Source token information including amount limits

paths
object[]
required
timestamp
string
required

Response timestamp (ISO string) for cache validation