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
.
resultType | Reason |
---|---|
| Best route found. Everything is OK. |
| If the best route has a high price impact, we recommend not proceeding with the next step (swap). The Rango API may give you an error in the next step to prevent potential losses. |
| There is a limit issue for the input amount. You could suggest user to increase or decrease the input amount based on |
| No routes found. |
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
.
Fee (Expense Types)
These are two possible types of fees (expenseType
field in the fee
array).
expenseType | Description |
---|---|
| The gas fee. This fee should be available in the user's wallet for the swap to succeed. |
| Some hidden fees in swapper which will be reduced from the user's output amount automatically. This fee is already calculated in the estimated output. |
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.
Last updated