POST
/
v1
/
route
/
multi
curl --request POST \
  --url https://backend.swap.coffee/v1/route/multi \
  --header 'Content-Type: application/json' \
  --data '{
  "input_assets": [
    {
      "token": {
        "blockchain": "ton",
        "address": "native"
      },
      "amount": 1
    }
  ],
  "output_asset": {
    "blockchain": "ton",
    "address": "native"
  },
  "max_splits": 4,
  "max_length": 3,
  "pool_selector": {
    "blockchains": [
      "ton"
    ],
    "dexes": [
      "dedust"
    ],
    "max_volatility": 1
  },
  "mev_protection": true,
  "additional_data": {
    "sender_address": "UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV",
    "referral_name": "tonkeeper"
  }
}'
{
  "routes": [
    {
      "input_token": {
        "address": {
          "blockchain": "ton",
          "address": "native"
        },
        "metadata": {
          "name": "ARBUZ",
          "symbol": "ARBUZ",
          "decimals": 123,
          "image_url": "<string>",
          "listed": true
        }
      },
      "output_token": {
        "address": {
          "blockchain": "ton",
          "address": "native"
        },
        "metadata": {
          "name": "ARBUZ",
          "symbol": "ARBUZ",
          "decimals": 123,
          "image_url": "<string>",
          "listed": true
        }
      },
      "input_amount": 123,
      "output_amount": 123,
      "input_usd": 123,
      "output_usd": 123,
      "savings": 123,
      "left_amount": 123,
      "recommended_gas": 123,
      "price_impact": 123,
      "estimated_cashback_usd": 123,
      "partner_commission_ton": 123,
      "mev_protection_fee": 123,
      "paths": [
        {
          "blockchain": "ton",
          "dex": "stonfi",
          "pool_address": "<string>",
          "input_token": {
            "address": {
              "blockchain": "ton",
              "address": "native"
            },
            "metadata": {
              "name": "ARBUZ",
              "symbol": "ARBUZ",
              "decimals": 123,
              "image_url": "<string>",
              "listed": true
            }
          },
          "output_token": {
            "address": {
              "blockchain": "ton",
              "address": "native"
            },
            "metadata": {
              "name": "ARBUZ",
              "symbol": "ARBUZ",
              "decimals": 123,
              "image_url": "<string>",
              "listed": true
            }
          },
          "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": [
            {}
          ]
        }
      ]
    }
  ],
  "output_token": {
    "address": {
      "blockchain": "ton",
      "address": "native"
    },
    "metadata": {
      "name": "ARBUZ",
      "symbol": "ARBUZ",
      "decimals": 123,
      "image_url": "<string>",
      "listed": true
    }
  },
  "total_output_amount": 123,
  "total_savings": 123,
  "total_estimated_cashback_usd": 123,
  "total_partner_commission_ton": 123,
  "total_mev_protection_fee": 123
}

Authorizations

X-Api-Key
string
header
required

Body

application/json

Response

200
application/json

resulting route

The response is of type object.