Build Path
Build an executable transaction for a selected xPath route.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.xpath.rath.fi/build-path" \ -H "Content-Type: application/json" \ -d '{ "fromChain": 0, "toChain": 0, "fromToken": "string", "toToken": "string", "Amount": "string", "Sender": "string" }'{
"code": 0,
"data": {
"allowanceTarget": "string",
"chain": 0,
"data": "string",
"expiry": 0,
"gasLimit": "string",
"simulation": true,
"to": "string"
},
"message": "string"
}Get quote
Returns ranked route quotes for a token pair and input amount. The response can include same-chain swaps, direct bridges, swap+bridge routes, or multi-bridge routes depending on the requested chains and planner output.
Build path by ID
Build an executable transaction from a previously quoted xPath route ID.