Quote
Returns bridge and swap route quotes for the given token pair and amount.
Query Parameters
Source chain ID for the input token. Required. Use the numeric chain ID configured in xPath for the chain that holds fromToken.
int640 <= valueDestination chain ID for the output token. Required. Use the numeric chain ID configured in xPath for the chain that holds toToken.
int640 <= valueInput 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.
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.
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.
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.
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.
doubleIntegrator fee in basis points, where 100 = 1%. Optional. Must be a non-negative integer. If omitted, no explicit integrator fee is requested.
int320 <= valueRestricts 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.
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.
[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.
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 identifier associated with the request. Optional. When provided, xPath echoes this value back as integratorId in each returned route.
[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.
[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.
[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.
[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.
double[VERIFY] Simulation-only hint. Optional. The /quote handler currently accepts this flag but does not branch on it when generating quotes.
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.
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.
int320 <= valueHeader Parameters
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"