curl --request POST \
--url https://backend.swap.coffee/v1/route/smart \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"input_token": {
"blockchain": "ton",
"address": "native"
},
"output_token": {
"blockchain": "ton",
"address": "native"
},
"input_amount": 1,
"output_amount": 1,
"max_splits": 4,
"additional_data": {
"sender_address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"referral_name": "tonkeeper"
}
}
'{
"input_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"output_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"input_amount": 123,
"output_amount": 123,
"input_usd": 123,
"output_usd": 123,
"recommended_gas": 123,
"price_impact": 123,
"paths": [
{
"blockchain": "ton",
"dex": "stonfi",
"pool_address": "<string>",
"input_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"output_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"swap": {
"result": "fully_fulfilled",
"input_amount": 123,
"output_amount": 123,
"before_reserves": [
123
],
"after_reserves": [
123
],
"reason": "<string>",
"left_amount": 123
},
"recommended_gas": 123,
"average_gas": 123,
"next": "<array>"
}
],
"savings": 123,
"left_amount": 123,
"estimated_cashback_usd": 123,
"partner_commission_ton": 123,
"mev_protection_fee": 123
}curl --request POST \
--url https://backend.swap.coffee/v1/route/smart \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"input_token": {
"blockchain": "ton",
"address": "native"
},
"output_token": {
"blockchain": "ton",
"address": "native"
},
"input_amount": 1,
"output_amount": 1,
"max_splits": 4,
"additional_data": {
"sender_address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"referral_name": "tonkeeper"
}
}
'{
"input_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"output_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"input_amount": 123,
"output_amount": 123,
"input_usd": 123,
"output_usd": 123,
"recommended_gas": 123,
"price_impact": 123,
"paths": [
{
"blockchain": "ton",
"dex": "stonfi",
"pool_address": "<string>",
"input_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"output_token": {
"address": {
"blockchain": "ton",
"address": "native"
},
"metadata": {
"name": "ARBUZ",
"symbol": "ARBUZ",
"decimals": 123,
"listed": true,
"verification": "whitelisted",
"image_url": "<string>"
}
},
"swap": {
"result": "fully_fulfilled",
"input_amount": 123,
"output_amount": 123,
"before_reserves": [
123
],
"after_reserves": [
123
],
"reason": "<string>",
"left_amount": 123
},
"recommended_gas": 123,
"average_gas": 123,
"next": "<array>"
}
],
"savings": 123,
"left_amount": 123,
"estimated_cashback_usd": 123,
"partner_commission_ton": 123,
"mev_protection_fee": 123
}Show child attributes
Show child attributes
Input amount in tokens (not nano!) to be swapped
x > 0If specified, the route will be built to get the specified output amount. If not specified, the route will be built to get the maximum output amount for the given input amount.
x > 0Defines the maximum number of independent paths (i.e., transactions) the route can split into. For v4 wallets, you can omit this or set it to 4; for v5 wallets, you can set it to 20 (this is our internal upper limit, and we may reduce it later to something like 10).
1 <= x <= 20Show child attributes
resulting route
Show child attributes
Show child attributes
Show child attributes
Fees for the usage of MEV protection.