Get a quote for a token transfer
This endpoint can be used to request a quote for a transfer of one token to another, cross chain or not.
The endpoint returns a Step
object which contains information about the estimated result as well as a transactionRequest
which can directly be sent to your wallet.
The estimated result can be found inside the estimate
, containing the estimated toAmount
of the requested Token
and the toAmountMin
, which is the guaranteed minimum value that the transfer will yield including slippage.
If you want to learn more about how to use this endpoint please have a look at our guide.
To learn more about our terminology please check our article.
To learn about the differences between /quote and /advanced/routes endpoints please review our guide.
NOTE: Solana ATA fees are returned as feeCosts
Headers
Authentication header, contact support if you want to get registered.
Query Parameters
The sending chain. Can be the chain id or chain key
The receiving chain. Can be the chain id or chain key
The token that should be transferred. Can be the address or the symbol
The token that should be transferred to. Can be the address or the symbol
The sending wallet address
The receiving wallet address. If none is provided, the fromAddress will be used
The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC (6 decimals))
Which kind of route should be preferred FASTEST: This sorting criterion prioritizes routes with the shortest estimated execution time. Users who value speed and want their transactions to be completed as quickly as possible should choose the fastest routes. CHEAPEST: This criterion focuses on minimizing the cost of the transaction, whether in token amount or USD amount (USD amount minus gas cost). Users looking for the most economical option should choose the cheapest routes.
FASTEST
, CHEAPEST
The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.
0 <= x <= 1
A string containing tracking information about the integrator of the API
The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. The maximum fee amount should be less than 100%.
0 <= x < 1
A string containing tracking information about the referrer of the integrator
List of bridges that are allowed for this transaction. Currently available bridges are for example hop
, allbridge
or amarok
. All supported bridges can be loaded from the /tools endpoint. Also values all
, none
, default
and []
are acceptable and mean all tools of the current type (all
), no tools (for none
and []
cases) and default tool's settings on the current stage.
List of exchanges that are allowed for this transaction. Currently available exchanges are aggregators such as 1inch
, paraswap
, openocean
and 0x
and a lot of dexes. All supported exchanges can be loaded from the /tools endpoint. Also values all
, none
, default
and []
are acceptable and mean all tools of the current type (all
), no tools (for none
and []
cases) and default tool's settings on the current stage.
List of bridges that are not allowed for this transaction. Currently available bridges are for example hop
, allbridge
or amarok
. All supported bridges can be loaded from the /tools endpoint. Also values all
, none
, default
and []
are acceptable and mean all tools of the current type (all
), no tools (for none
and []
cases) and default tool's settings on the current stage.
List of exchanges that are not allowed for this transaction. Currently available exchanges are aggregators such as 1inch
, paraswap
, openocean
and 0x
and a lot of dexes. All supported exchanges can be loaded from the /tools endpoint. Also values all
, none
, default
and []
are acceptable and mean all tools of the current type (all
), no tools (for none
and []
cases) and default tool's settings on the current stage.
List of bridges that should be preferred for this transaction. Currently available bridges are for example hop
, allbridge
or amarok
. All supported bridges can be loaded from the /tools endpoint. Also values all
, none
, default
and []
are acceptable and mean all tools of the current type (all
), no tools (for none
and []
cases) and default tool's settings on the current stage.
List of exchanges that should be preferred for this transaction. Currently available exchanges are aggregators such as 1inch
, paraswap
, openocean
and 0x
and a lot of dexes. All supported exchanges can be loaded from the /tools endpoint. Also values all
, none
, default
and []
are acceptable and mean all tools of the current type (all
), no tools (for none
and []
cases) and default tool's settings on the current stage.
Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer. Separate swap transactions on the destination chain are not affected by this flag. By default, parameter is true
.
The amount of the token to convert to gas on the destination side.
The price impact threshold above which routes are hidden. As an example, one should specify 0.15 (15%) to hide routes with more than 15% price impact. The default is 10%.
Timing setting to wait for a certain amount of swap rates. In the format minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}
. Please check docs.li.fi for more details.
Timing setting to wait for a certain amount of routes to be generated before chosing the best one. In the format minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}
. Please check docs.li.fi for more details.
Response
The step populated with the transaction data
Object that represents one step of a Route