GET /routeAndSwap

GET get best routes and generate swap transaction calldata to swap in Butter router

Request Parameters

Name
Location
Type
Required
Description

fromChainId

query

string

yes

source chain id, the supported chain ID list can be get from endpiont /supportedChainList

toChainId

query

string

yes

destination chain id

amount

query

string

yes

amount of source token

tokenInAddress

query

string

yes

address of source token, use 0x0000000000000000000000000000000000000000 for native token on most blockchains, T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb for native token on Tron

tokenOutAddress

query

string

yes

address of destination token

type

query

string

yes

swap type, one of "exactIn" and "exactOut"

slippage

query

string

yes

slippage of swap, a integer in range [0, 5000], e.g, 100 means 1%. For cross chain swap, the min slippage is 150, for cross chain from/to TON/BTC, min slippage is 300

from

query

string

yes

sender address on source chain

receiver

query

string

yes

receiver address on destination chain

entrance

query

string

no

entrance of swap, ether entrance or referrer should be specified. It is required when source chain is Near, please contact us for applying your dedicated entrance

referrer

query

string

no

referrer of swap, ether entrance or referrer should be specified. If entrance is not provided, referrer is required

feeType

query

string

no

fee type when collecting fee, "0" for fixed fee, "1" for proportion fee, the default value is "1". This field is valid only when entrance is not provided

rateOrNativeFee

query

string

no

if fee type is "0", this is the fixed fee amount in native token, if fee type is "1", this is the proportion fee rate. This field is valid only when entrance is not provided'

callData

query

string

no

encoded call data if receiver is a contract

caller

query

string

no

caller of butter router contract, e.g., the smart contract address who calls butter rotuer, or the user account who directly calls butter router

Request Example

GET /routeAndSwap?fromChainId=1&toChainId=56&amount=1&tokenInAddress=0x0000000000000000000000000000000000000000&tokenOutAddress=0x0000000000000000000000000000000000000000&type=exactIn&slippage=150&entrance=<entrance>&from=0x2D4C407BBe49438ED859fe965b140dcF1aaB71a9&receiver=0x2D4C407BBe49438ED859fe965b140dcF1aaB71a9

Responses Structure

The response contains the following fields:

Field
Type
Description

errno

number

Error code. 0 means success, other values indicate errors, see error code list.

message

string

Response message. If the request was successful it is success, otherwise it gives corresponding error message.

data

array

Contains data on the swap route path, fees, etc.

data Field

The data field contains an array with one or more route and swap data. Each item has the following fields:

Field
Type
Description

route

object

The detailed route information, please refer to route API for details.

txParam

object

The swap transaction information, please refer to swap API for details.

Response Examples

  1. get best routes and swap transaction calldata successfully

200 Response

{
  "errno": 0,
  "message": "success",
  "data": [
    {
      "route": {
        "diff": "0",
        "bridgeFee": {
          "amount": "0.00338",
          "symbol": "WETH",
          "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
          "chainId": 22776,
          "in": {
            "amount": "0.0",
            "token": {
              "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
              "name": "Mapped Wrapped Ether",
              "decimals": 18,
              "symbol": "WETH",
              "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
            }
          },
          "out": {
            "amount": "0.00338",
            "token": {
              "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
              "name": "Mapped Wrapped Ether",
              "decimals": 18,
              "symbol": "WETH",
              "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
            }
          }
        },
        "tradeType": 0,
        "gasFee": {
          "amount": "0.00067511265096",
          "symbol": "ETH",
          "inUSD": "2.355691630386166"
        },
        "swapFee": {
          "nativeFee": "0.0",
          "tokenFee": "0.0"
        },
        "feeConfig": {
          "feeType": 1,
          "referrer": "0x200AEe9ba7040d778922A763CE8A50948d61AFF5",
          "rateOrNativeFee": 0
        },
        "gasEstimated": "170000",
        "gasEstimatedTarget": "841800",
        "timeEstimated": 1080,
        "hash": "0x9e9a0b7e4c0e06b2242b49011cfd06665b3934397aba2d52b0f968f11933cac3",
        "entrance": "<entrance>",
        "timestamp": 1735105523772,
        "hasLiquidity": true,
        "srcChain": {
          "chainId": "1",
          "tokenIn": {
            "address": "0x0000000000000000000000000000000000000000",
            "name": "ETH",
            "decimals": 18,
            "symbol": "ETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0x0000000000000000000000000000000000000000/logo.png"
          },
          "tokenOut": {
            "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "name": "Wrapped Ether",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "totalAmountIn": "1.0",
          "totalAmountOut": "1.0",
          "route": [
            {
              "amountIn": "1.0",
              "amountOut": "1.0",
              "dexName": "",
              "path": []
            }
          ],
          "totalAmountOutUSD": "3489.33119093",
          "bridge": "Butter"
        },
        "bridgeChain": {
          "chainId": "22776",
          "tokenIn": {
            "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
            "name": "Mapped Wrapped Ether",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "tokenOut": {
            "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
            "name": "Mapped Wrapped Ether",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "totalAmountIn": "1.0",
          "totalAmountOut": "0.99662",
          "route": [
            {
              "amountIn": "1.0",
              "amountOut": "0.99662",
              "dexName": "",
              "path": []
            }
          ],
          "bridge": "Butter"
        },
        "dstChain": {
          "chainId": "56",
          "tokenIn": {
            "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
            "name": "Wrapped ETH",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "tokenOut": {
            "address": "0x0000000000000000000000000000000000000000",
            "name": "BNB",
            "decimals": 18,
            "symbol": "BNB",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/binance-smart-chain/0x0000000000000000000000000000000000000000/logo.png"
          },
          "totalAmountIn": "0.99662",
          "totalAmountOut": "4.939139219083695572",
          "route": [
            {
              "amountIn": "0.597972",
              "amountOut": "2.963763799469397691",
              "dexName": "PancakeswapV3",
              "path": [
                {
                  "id": "0x62Fcb3C1794FB95BD8B1A97f6Ad5D8a7e4943a1e",
                  "tokenIn": {
                    "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
                    "name": "Wrapped ETH",
                    "decimals": 18,
                    "symbol": "WETH",
                    "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
                  },
                  "tokenOut": {
                    "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
                    "name": "Wrapped BNB",
                    "decimals": 18,
                    "symbol": "WBNB",
                    "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/binance-smart-chain/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c/logo.png"
                  },
                  "fee": "100"
                }
              ],
              "priceImpact": "0.0315022"
            },
            {
              "amountIn": "0.398648",
              "amountOut": "1.975375419614297881",
              "dexName": "PancakeswapV3",
              "path": [
                {
                  "id": "0xD0e226f674bBf064f54aB47F42473fF80DB98CBA",
                  "tokenIn": {
                    "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
                    "name": "Wrapped ETH",
                    "decimals": 18,
                    "symbol": "WETH",
                    "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
                  },
                  "tokenOut": {
                    "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
                    "name": "Wrapped BNB",
                    "decimals": 18,
                    "symbol": "WBNB",
                    "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/binance-smart-chain/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c/logo.png"
                  },
                  "fee": "500"
                }
              ],
              "priceImpact": "0.0552814"
            }
          ],
          "totalAmountOutUSD": "3477.462882862167",
          "bridge": "Butter"
        },
        "totalAmountInUSD": "3489.33119093",
        "totalAmountOutUSD": "3477.462882862167",
        "contract": "0xEE030ec6F4307411607E55aCD08e628Ae6655B86",
        "minAmountOut": {
          "amount": "4.865052130797440139",
          "symbol": "BNB"
        }
      },
      "txParam": {
        "errno": 0,
        "message": "success",
        "data": [
          {
            "to": "0xEE030ec6F4307411607E55aCD08e628Ae6655B86",
            "data": "0x6e1537da00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d0e30db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000014ff0309a8f2a9d9afe040d990bba4ef3512e3288800000000000000000000000000000000000000000000000000000000000000000000000000000000000007c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200aee9ba7040d778922a763ce8a50948d61aff50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006e0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000006c00000000000000000000000000000000000000000000000000000000000000660000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000000000000000000000000000004384232305f04c8b00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000aa301070448385cfaac5913a67b16c4392944a8f000000000000000000000000aa301070448385cfaac5913a67b16c4392944a8f0000000000000000000000000000000000000000000000000dd4b49c140cc00000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000004a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000404efa0646500000000000000000000000000000000000000000000000000000000000000200000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000000000000000000000000000004384232305f04c8b00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd400000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd4000000000000000000000000000000000000000000000000084c6c5da5a1400000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002b2170ed0880ac9a755fd29b2688956bd959f933f8000064bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd400000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd40000000000000000000000000000000000000000000000000588483e6e6b800000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002b2170ed0880ac9a755fd29b2688956bd959f933f80001f4bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000200aee9ba7040d778922a763ce8a50948d61aff50000000000000000000000000000000000000000000000000000000000000000",
            "value": "0x0de0b6b3a7640000",
            "chainId": "1",
            "method": "swapAndBridge",
            "args": [
              {
                "type": "bytes32",
                "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
              },
              {
                "type": "address",
                "value": "0x2D4C407BBe49438ED859fe965b140dcF1aaB71a9"
              },
              {
                "type": "address",
                "value": "0x0000000000000000000000000000000000000000"
              },
              {
                "type": "uint256",
                "value": "1000000000000000000"
              },
              {
                "type": "bytes",
                "value": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d0e30db000000000000000000000000000000000000000000000000000000000"
              },
              {
                "type": "bytes",
                "value": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000014ff0309a8f2a9d9afe040d990bba4ef3512e3288800000000000000000000000000000000000000000000000000000000000000000000000000000000000007c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200aee9ba7040d778922a763ce8a50948d61aff50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006e0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000006c00000000000000000000000000000000000000000000000000000000000000660000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000000000000000000000000000004384232305f04c8b00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000aa301070448385cfaac5913a67b16c4392944a8f000000000000000000000000aa301070448385cfaac5913a67b16c4392944a8f0000000000000000000000000000000000000000000000000dd4b49c140cc00000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000004a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000404efa0646500000000000000000000000000000000000000000000000000000000000000200000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d4c407bbe49438ed859fe965b140dcf1aab71a90000000000000000000000000000000000000000000000004384232305f04c8b00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd400000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd4000000000000000000000000000000000000000000000000084c6c5da5a1400000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002b2170ed0880ac9a755fd29b2688956bd959f933f8000064bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd400000000000000000000000013f4ea83d0bd40e75c8222255bc855a974568dd40000000000000000000000000000000000000000000000000588483e6e6b800000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002b2170ed0880ac9a755fd29b2688956bd959f933f80001f4bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
              },
              {
                "type": "bytes",
                "value": "0x"
              },
              {
                "type": "bytes",
                "value": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000200aee9ba7040d778922a763ce8a50948d61aff50000000000000000000000000000000000000000000000000000000000000000"
              }
            ]
          }
        ]
      }
    }
  ]
}
  1. get route successfully but fail to get swap transaction calldata

200 Response

{
  "errno": 0,
  "message": "success",
  "data": [
    {
      "route": {
        "diff": "0",
        "bridgeFee": {
          "amount": "0.06018",
          "symbol": "WETH",
          "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
          "chainId": 22776,
          "in": {
            "amount": "0.0",
            "token": {
              "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
              "name": "Mapped Wrapped Ether",
              "decimals": 18,
              "symbol": "WETH",
              "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
            }
          },
          "out": {
            "amount": "0.06018",
            "token": {
              "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
              "name": "Mapped Wrapped Ether",
              "decimals": 18,
              "symbol": "WETH",
              "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
            }
          }
        },
        "tradeType": 0,
        "gasFee": {
          "amount": "0.00064206775057",
          "symbol": "ETH",
          "inUSD": "2.2398451300575677"
        },
        "swapFee": {
          "nativeFee": "0.0",
          "tokenFee": "0.0"
        },
        "feeConfig": {
          "feeType": 1,
          "referrer": "0x200AEe9ba7040d778922A763CE8A50948d61AFF5",
          "rateOrNativeFee": 0
        },
        "gasEstimated": "170000",
        "gasEstimatedTarget": "4019673",
        "timeEstimated": 1080,
        "hash": "0x81878c4a1c222d380d495c2fc4391c05acd186ba4d9a9a3378a4805c8df1dcd5",
        "entrance": "buttertest",
        "timestamp": 1735105659812,
        "hasLiquidity": false,
        "srcChain": {
          "chainId": "1",
          "tokenIn": {
            "address": "0x0000000000000000000000000000000000000000",
            "name": "ETH",
            "decimals": 18,
            "symbol": "ETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0x0000000000000000000000000000000000000000/logo.png"
          },
          "tokenOut": {
            "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "name": "Wrapped Ether",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "totalAmountIn": "100.0",
          "totalAmountOut": "100.0",
          "route": [
            {
              "amountIn": "100.0",
              "amountOut": "100.0",
              "dexName": "",
              "path": []
            }
          ],
          "totalAmountOutUSD": "348848.720103",
          "bridge": "Butter"
        },
        "bridgeChain": {
          "chainId": "22776",
          "tokenIn": {
            "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
            "name": "Mapped Wrapped Ether",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "tokenOut": {
            "address": "0x05aB928d446d8ce6761e368c8e7bE03C3168A9ec",
            "name": "Mapped Wrapped Ether",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "totalAmountIn": "100.0",
          "totalAmountOut": "99.93982",
          "route": [
            {
              "amountIn": "100.0",
              "amountOut": "99.93982",
              "dexName": "",
              "path": []
            }
          ],
          "bridge": "Butter"
        },
        "dstChain": {
          "chainId": "56",
          "tokenIn": {
            "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
            "name": "Wrapped ETH",
            "decimals": 18,
            "symbol": "WETH",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/logo.png"
          },
          "tokenOut": {
            "address": "0x0000000000000000000000000000000000000000",
            "name": "BNB",
            "decimals": 18,
            "symbol": "BNB",
            "icon": "https://s3.amazonaws.com/map-static-file/mapSwap/binance-smart-chain/0x0000000000000000000000000000000000000000/logo.png"
          },
          "totalAmountIn": "99.93982",
          "totalAmountOut": "494.448181756698721616",
          "route": [
            {
              "amountIn": "99.93982",
              "amountOut": "494.448181756698721616",
              "dexName": "1inch",
              "path": [],
              "extra": "0x07ed2379000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd090000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f8000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd09000000000000000000000000aa301070448385cfaac5913a67b16c4392944a8f0000000000000000000000000000000000000000000000056af190c9407ac00000000000000000000000000000000000000000000000001976c12d874d842a3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000fda000000000000000000000000000000000000000000000fbc000fa6000f5c00a0c9e75c4800000000000000050302000000000000000000000000000000000000000000000f2e00090500057a00a007e5c0d20000000000000000000000000000000000000000000000000005560000f051204c4af8dbc524681930a27b2f1af5bcc8062e6fb72170ed0880ac9a755fd29b2688956bd959f933f800447dc203820000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000007130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000095d463baf057b38000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900000000000000000000000042f527f50f16a103b6ccab48bccca214500c102100a0c9e75c4800000000001e0f02020100000000000000000000000000000000043800038900023900018a0000db00a007e5c0d20000000000000000000000000000000000000000000000000000b700007b0c207130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c61eb789d75a95caa3ff50ed7e47b96c132fec0826ae4071198002625a061eb789d75a95caa3ff50ed7e47b96c132fec0820000000000000000000000000000000000000000000000001a11fb0ed39125f57130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c4101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a00000000000000000000000000000000000000000000000003427765a898ff23fee63c1e501fc75f4e78bf71ed5066db9ca771d4ccb7c1264e07130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c4101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a0000000000000000000000000000000000000000000000000342d07b6a7801496ee63c1e50128df0835942396b7a1b7ae1cd068728e6ddbbafd7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c4101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000012c0000f051004c4af8dbc524681930a27b2f1af5bcc8062e6fb77130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c00447dc203820000000000000000000000007130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000018704b2a94d904351000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900000000000000000000000042f527f50f16a103b6ccab48bccca214500c10214101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a00000000000000000000000000000000000000000000000030e8dad4e68ce69edee63c1e5016bbc40579ad1bbd243895ca0acb086bb6300d6367130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c4101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a0c9e75c480000000000001d0d050300000000000000000000000000000000000000035d00020d00015e0000af00a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a00000000000000000000000000000000000000000000000007562dd0571004a6bee63c1e5010f338ec12d3f7c3d77a4b9fcc1f95f3fb6ad0ea62170ed0880ac9a755fd29b2688956bd959f933f84101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a0000000000000000000000000000000000000000000000000c399db0b8fe8b743ee63c1e50162fcb3c1794fb95bd8b1a97f6ad5d8a7e4943a1e2170ed0880ac9a755fd29b2688956bd959f933f84101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a0000000000000000000000000000000000000000000000001fc9e416bd5c35b27ee63c1e501d0e226f674bbf064f54ab47f42473ff80db98cba2170ed0880ac9a755fd29b2688956bd959f933f84101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000012c0000f051204c4af8dbc524681930a27b2f1af5bcc8062e6fb72170ed0880ac9a755fd29b2688956bd959f933f800447dc203820000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f8000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000046e40a3f76c5d43ea000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900000000000000000000000042f527f50f16a103b6ccab48bccca214500c10214101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d20000000000000000000000000000000000000000000000000006050000f051204c4af8dbc524681930a27b2f1af5bcc8062e6fb72170ed0880ac9a755fd29b2688956bd959f933f800447dc203820000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f800000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000002314278542849db249b2000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900000000000000000000000042f527f50f16a103b6ccab48bccca214500c102100a0c9e75c4800000000120c090702020000000000000000000000000004e70004380002e800023900018a0000db00a007e5c0d20000000000000000000000000000000000000000000000000000b700007b0c2055d398326f99059ff775485246999027b319795516b9a82891338f9ba80e2d6970fdda79d1eb0dae6ae4071198002625a016b9a82891338f9ba80e2d6970fdda79d1eb0dae000000000000000000000000000000000000000000000000825029b0a19f6f2655d398326f99059ff775485246999027b31979554101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a0000000000000000000000000000000000000000000000000825ea2fb1c7ad469ee63c1e50147a90a2d92a8367a91efa1906bfc8c1e05bf10c455d398326f99059ff775485246999027b31979554101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a0000000000000000000000000000000000000000000000001c832d54c6e5c7453ee63c1e50136696169c63e42cd08ce11f5deebbcebae65205055d398326f99059ff775485246999027b31979554101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a00000000000000000000000000000000000000000000000024ab0a6407099a1a8ee63c1e5016fe9e9de56356f7edbfcbb29fab7cd69471a486955d398326f99059ff775485246999027b31979554101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000012c0000f051004c4af8dbc524681930a27b2f1af5bcc8062e6fb755d398326f99059ff775485246999027b319795500447dc2038200000000000000000000000055d398326f99059ff775485246999027b3197955000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000030de7c390a627a619000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900000000000000000000000042f527f50f16a103b6ccab48bccca214500c10214101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000008b00004f02a00000000000000000000000000000000000000000000000049572ab320c42afceee63c1e501172fcd41e0913e95784454622d1c3724f546f84955d398326f99059ff775485246999027b31979554101bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00042e1a7d4d000000000000000000000000000000000000000000000000000000000000000000a0f2fa6b66eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000001acdd8d19be5ce7d50000000000000000000193be13228ab47c061111111125421ca6dc452d289314280a0f8842a6500000000000052fd304d"
            }
          ],
          "totalAmountOutUSD": "348084.6024239294",
          "bridge": "Butter"
        },
        "totalAmountInUSD": "348848.720103",
        "totalAmountOutUSD": "348084.6024239294",
        "contract": "0xEE030ec6F4307411607E55aCD08e628Ae6655B86",
        "minAmountOut": {
          "amount": "487.031459030348240792",
          "symbol": "BNB"
        }
      },
      "error": {
        "response": {
          "errno": 2004,
          "message": "Insufficient Liquidity"
        },
        "status": 200,
        "message": "Insufficient Liquidity",
        "name": "HttpException"
      }
    }
  ]
}
  1. fail to get route

200 Response

{
    "errno": <error code>,
    "message": <detailed error message>
}

Note: error code can be found in here

Last updated