RathRath Finance
API Reference

Quote

Returns bridge and swap route quotes for the given token pair and amount.

GET
/quote

Query Parameters

fromChain*integer

Source chain ID for the input token. Required. Use the numeric chain ID configured in xPath for the chain that holds fromToken.

Formatint64
Range0 <= value
toChain*integer

Destination chain ID for the output token. Required. Use the numeric chain ID configured in xPath for the chain that holds toToken.

Formatint64
Range0 <= value
fromToken*string

Input token identifier on fromChain. Required. Pass the chain-specific token address or mint address exactly as xPath stores it for that chain. [VERIFY] Confirm the canonical native-token placeholder, if any, for each supported chain.

toToken*string

Output token identifier on toChain. Required. Pass the chain-specific token address or mint address exactly as xPath stores it for that chain. [VERIFY] Confirm the canonical native-token placeholder, if any, for each supported chain.

amount*string

Input amount to quote, encoded as a base-10 integer string in the token's smallest unit. Required. Example: 1000000 for 1 USDC when the token has 6 decimals.

sender*string

Wallet address that will supply the input token for the route. Required. This value is forwarded into quote planning and echoed back in the response.

slippage?|

Maximum slippage tolerance for the quoted route, expressed as a percentage. Optional. Example: 1 means 1%. If omitted, xPath does not set a route-level slippage value in the response and downstream providers may apply their own defaults. [VERIFY] Confirm whether a planner-wide default slippage is enforced when this field is absent.

Formatdouble
feeBps?|

Integrator fee in basis points, where 100 = 1%. Optional. Must be a non-negative integer. If omitted, no explicit integrator fee is requested.

Formatint32
Range0 <= value
includeProvider?array<>

Restricts quoting to the listed provider keys. Optional. Accepts a repeated query parameter or a comma-separated list. Matching is case-insensitive in the planner. If omitted, all providers remain eligible unless excluded by excludeProvider.

excludeProvider?array<>

Removes the listed provider keys from consideration. Optional. Accepts a repeated query parameter or a comma-separated list. Matching is case-insensitive in the planner. If omitted, no providers are explicitly excluded.

priorityProvider?|

[VERIFY] Preferred provider hint. Optional. The /quote handler currently accepts this field but does not pass it into route planning, so it has no documented effect today.

routeMode?|

Route ranking strategy. Optional. Supported values currently recognized by the handler are fastest, max_value, and suggested. fastest ranks by speed, max_value ranks by output value, and suggested uses balanced ranking. Any other value, or omission, falls back to max_value.

Integrator?|

Integrator identifier associated with the request. Optional. When provided, xPath echoes this value back as integratorId in each returned route.

Referrer?|

[VERIFY] Referrer identifier for partner attribution. Optional. The /quote handler currently accepts this field but does not use it during quote planning or route shaping.

destinationCallData?|

[VERIFY] Destination-chain call data to associate with the route. Optional. The /quote handler currently accepts this field but does not use it while building quotes.

destinationGasLimit?|

[VERIFY] Destination-chain gas limit hint, encoded as a string integer. Optional. The /quote handler currently accepts this field but does not use it while building quotes.

allowedPriceImpact?|

[VERIFY] Maximum acceptable price impact for route selection. Optional. The /quote handler currently accepts this field but does not enforce planner-side filtering with it.

Formatdouble
simulation?|

[VERIFY] Simulation-only hint. Optional. The /quote handler currently accepts this flag but does not branch on it when generating quotes.

allowMultiBridge?|

Enables multi-bridge route candidates during planning. Optional. If true, xPath may return routes that use more than one bridge hop. If omitted, the planner behaves as if this value were false.

acquisitionMode?|

Input token acquisition mode. Optional. xPath contract calldata supports 0 = direct transfer, 1 = native token, 2 = Permit2, and 3 = Permit2Witness. If omitted, downstream execution logic defaults to direct transfer semantics when needed.

Formatint32
Range0 <= value

Header Parameters

api-key*string

Required xPath API key used for authenticated access and account-based rate limits. Missing or invalid keys return 401.

Response Body

application/json

application/json

application/json

text/plain

curl -X GET "https://api.xpath.rath.fi/quote?fromChain=0&toChain=0&fromToken=string&toToken=string&amount=string&sender=string" \  -H "api-key: string"
{
  "code": 0,
  "message": "string",
  "data": [
    {
      "amount": "string",
      "amountOut": "string",
      "amountOutUsd": 0,
      "amountUsd": 0,
      "bridgeCount": 0,
      "expiry": 0,
      "fees": {
        "integratorFee": "string",
        "integratorFeeUsd": 0.1,
        "pathFee": "string",
        "pathFeeUsd": 0.1
      },
      "fromToken": {
        "address": "string",
        "chain": 0,
        "decimals": 0,
        "icon": "string",
        "name": "string",
        "priceUsd": 0,
        "symbol": "string"
      },
      "gasFee": {
        "gasFee": "string",
        "gasFeeUsd": 0.1,
        "gasLimit": "string",
        "gasToken": {
          "address": "string",
          "chain": 0,
          "decimals": 0,
          "icon": "string",
          "name": "string",
          "priceUsd": 0,
          "symbol": "string"
        }
      },
      "integratorId": "string",
      "minAmountOut": "string",
      "minAmountOutUsd": 0,
      "path": [
        {
          "bridgeFee": "string",
          "chain": 0,
          "estimatedTime": 0,
          "fee": "string",
          "fromAmount": "string",
          "fromChain": 0,
          "fromToken": {
            "address": "string",
            "chain": 0,
            "decimals": 0,
            "icon": "string",
            "name": "string",
            "priceUsd": 0,
            "symbol": "string"
          },
          "provider": {
            "icon": "string",
            "name": "string",
            "type": "string"
          },
          "stepType": "string",
          "toAmount": "string",
          "toChain": 0,
          "toToken": {
            "address": "string",
            "chain": 0,
            "decimals": 0,
            "icon": "string",
            "name": "string",
            "priceUsd": 0,
            "symbol": "string"
          }
        }
      ],
      "pathId": "string",
      "pathTime": 0,
      "pathType": "string",
      "providers": [
        {
          "icon": "string",
          "name": "string",
          "type": "string"
        }
      ],
      "quoteId": "string",
      "receiver": "string",
      "routeAddress": "string",
      "sender": "string",
      "slippage": 0,
      "toToken": {
        "address": "string",
        "chain": 0,
        "decimals": 0,
        "icon": "string",
        "name": "string",
        "priceUsd": 0,
        "symbol": "string"
      }
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "data": null
}
{
  "code": 0,
  "message": "string",
  "data": null
}
"string"