Quote params

Find the best quote to exchange via VulpeFI router: /api/quote

Description of query parameters

Parameter name
Type
Description

src *

string

contract address of a token to sell e.g.: 0x...xxx example

dst *

string

contract address of a token to buy e.g.: 0x...xxx example

amount *

integer

amount of a token to sell, set in minimal divisible units e.g.: 1.00 DAI set as 1000000000000000000 51.03 USDC set as 51030000

includeTokensInfo

boolean

if set to true, response will include from token and to token info default: false

includeProtocols

boolean

if set to true, response will include protocols used in the quote default: false

includeGas

boolean

if set to true, response will include gas limit anticipated for the quote default: false

fee

number

this percentage of src token amount will be sent to referrerAddress, the rest will be used as input for a swap min: 0; max: 3; default: 0; example to set a fee to 1.5%: &fee=1.5

protocols

string

specify liquidity protocols to use. If not set, all liquidity protocols will be used e.g.: &protocols= default: all protocols can be used

gasPrice

string

VulpeFI takes in account gas expenses to determine exchange route. It is important to use the same gas price on the quote and swap methods gas price set in wei: 12.5 GWEI set as 12500000000 default: "fast" from the network

complexityLevel

string

maximum number of token-connectors to be used in a transaction. The more is used — the longer route estimation will take, the more complex route might be as a result. If not set, two token-connectors might be used min: 0; max: 3; default: 2

connectorTokens

string

token-connectors can be specified via this parameter. The more is set — the longer route estimation will take. If not set, default token-connectors will be used. If token you want to exchange doesn't have a pool with one of the default token-connectors, this parameter will help find the route; should be the same for a quote and swap e.g.: &connectorTokens=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE, 0x...xxx example default: list of default token-connectors

gasLimit

integer

maximum amount of gas for a swap; should be the same for a quote and swap default: 11500000; max: 11500000;

mainRouteParts

integer

limit maximum number of main route parts; should be the same for a quote and swap default: 20; max: 50;

parts

integer

limit maximum number of parts each main route part can be split into; should be the same for a quote and swap default: 20; max: 100;

Description of response parameters

fromToken

string

parameters of a token to sell

toToken

string

parameters of a token to buy

fromAmount

string

input amount of fromToken in minimal divisible units

toAmount

string

result amount of toToken in minimal divisible units

protocols

string

route of the trade

gas

string

rough estimated amount of the gas limit for used protocols; do not use gas from the quote method as the gas limit of a transaction

Last updated