Quote Response Detail

Quote response detail

Status (Result Type)

Using resultType field, you could decide if the quote response is valid or need to show a proper message to the user. Possible values for this field are OK , HIGH_IMPACT , INPUT_LIMIT_ISSUE and NO_ROUTE.

Limits (Amount Restrictions)

The amountRestriction field indicates the minimum and maximum possible input amount for this quote. EXCLUSIVE field means that min<input<max and INCLUSIVE means min<=input<=max.

sample quote, amountRestriction
{
  // other fields ...,
  "amountRestriction": {
    "min": "40666469010361176",
    "max": "67777448350601960000000",
    "type": "INCLUSIVE"
  },
}

Fee (Expense Types)

These are two possible types of fees (expenseType field in the fee array).

And this is a sample fee object you get through the quote/swap endpoint. You could show the user feeUsd amount as the total fee he/she should pay for this route.

sample quote, fee
{
  // other fields ...,
  "feeUsd": 0.2527750142059618,
  "fee": [{
    "token": {
      "blockchain": "BSC",
      "symbol": "BNB",
      "name": null,
      "isPopular": true,
      "chainId": "56",
      "address": null,
      "decimals": 18,
      "image": "https://api.rango.exchange/tokens/ETH/BNB.png",
      "blockchainImage": "https://api.rango.exchange/blockchains/bsc.svg",
      "usdPrice": 243.71759113601925,
      "supportedSwappers": [
        "Wormhole",
        "ParaSwap Bsc",
        "OneInchBsc",
        "cBridge v2.0"
      ]
    },
    "expenseType": "FROM_SOURCE_WALLET",
    "amount": "1037163600000000",
    "name": "Network Fee"
  }
]

Last updated