curl --request POST \
--url https://backend.swap.coffee/v2/route/transactions \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"sender_address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"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>"
}
],
"slippage": 0.05,
"dynamic_slippage": true,
"referral_name": "tonkeeper",
"custom_fee": {
"fixed_fee": "<string>",
"percentage_fee": 123,
"min_percentage_fee_fixed": "<string>",
"max_percentage_fee_fixed": "<string>"
},
"mev_protection": true
}
'{
"route_id": 123,
"transactions": [
{
"address": "EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez",
"value": "<string>",
"cell": "aSDinaTvuI8gbWludGxpZnk=",
"send_mode": 123,
"query_id": 123,
"stateInit": "aSDinaTvuI8gbWludGxpZnk="
}
]
}curl --request POST \
--url https://backend.swap.coffee/v2/route/transactions \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"sender_address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
"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>"
}
],
"slippage": 0.05,
"dynamic_slippage": true,
"referral_name": "tonkeeper",
"custom_fee": {
"fixed_fee": "<string>",
"percentage_fee": 123,
"min_percentage_fee_fixed": "<string>",
"max_percentage_fee_fixed": "<string>"
},
"mev_protection": true
}
'{
"route_id": 123,
"transactions": [
{
"address": "EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez",
"value": "<string>",
"cell": "aSDinaTvuI8gbWludGxpZnk=",
"send_mode": 123,
"query_id": 123,
"stateInit": "aSDinaTvuI8gbWludGxpZnk="
}
]
}"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV"
Value of this field is a response from route building endpoint
Show child attributes
"ton"
"stonfi"
Show child attributes
Show child attributes
"ARBUZ"
"ARBUZ"
whitelisted, blacklisted, community, unknown Show child attributes
Show child attributes
"ARBUZ"
"ARBUZ"
whitelisted, blacklisted, community, unknown Show child attributes
Result of the swap
fully_fulfilled, partially_fulfilled, unavailable If the slippage is exceeded, the transaction will not be executed and intermediate tokens will be returned to the sender.
0 <= x <= 10.05
If set to true, slippage will be calculated dynamically.
true
May be set whilst building transactions from B2B partnership products
"tonkeeper"
If present, additional transaction for fees collection will be generated. Because of that, be careful with max_splits to not exceed wallet contract limits
Show child attributes
Value in nanotons
Value in 1/1000000: 1 is 0.0001%, 1000000 is 100%. If present, can not be less than 10000000 (0.01 TON)
Value in nanotons. No less than this value may be withdrawn as a percentage_fee. Must be set if percentage_fee is present. Can not be less than 10000000 (0.01 TON)
Value in nanotons. If set, no more than this value may be withdrawn as a percentage_fee. Taken into account only if percentage_fee is present
Whether a MEV protection should be enabled
true
transactions for the route
Unique identifier of the route used for tracking.
Show child attributes
"EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez"
Amount of nanotons to be sent. Can be passed to TonConnect transaction.
Base64-encoded cell. Treated as a payload field in TonConnect transaction.
Internal message send mode. More: https://docs.ton.org/develop/smart-contracts/messages#message-modes
Unique identifier of the query used for tracking swap.coffee transactions among others
Base64-encoded stateInit cell. Used to deploy a contract