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>"
  },
  "paths": [
    {
      "chainId": 123,
      "tokens": "all",
      "supportsExactAmountIn": true,
      "supportsExactAmountOut": true,
      "amountLimits": {
        "minAmount": "<string>",
        "maxAmount": "<string>"
      }
    }
  ],
  "timestamp": "<string>"
}

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
enum<string>[]

Bridge IDs to exclude from routing

Bridge protocol identifier.

Available options:
optimism,
arbitrum,
oft,
yield-oft,
hyperlane,
ghost,
mayan,
across,
relay,
alt-vm-1,
alt-vm-2
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