Routing
Returns the best route for the given trade pair using smart settings
post/v1/route/smart
Request
- Base URLhttps://backend.swap.coffee
- Auth
- none
- or API key in header X-Api-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"input_token": {
"blockchain": "ton",
"address": "native"
},
"output_token": {
"blockchain": "ton",
"address": "native"
},
"additional_data": {
"sender_address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"referral_name": "tonkeeper"
}
}Response
resulting route
Example response
{
"input_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ"
}
},
"output_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ"
}
},
"paths": [
{
"blockchain": "ton",
"dex": "stonfi",
"input_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ"
}
},
"output_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ"
}
}
}
]
}Changes
No recorded changes to this operation across all 7 revisions of this API.