LifiQuoteRequest

data class LifiQuoteRequest(val fromChain: String, val toChain: String, val fromToken: String, val toToken: String, val fromAddress: String, val fromAmount: String, val toAddress: String? = null, val order: LifiQuoteOrder? = null, val slippage: Double? = null, val integrator: String? = null, val fee: Double? = null, val referrer: String? = null, val allowBridges: List<String>? = null, val allowExchanges: List<String>? = null, val denyBridges: List<String>? = null, val denyExchanges: List<String>? = null, val preferBridges: List<String>? = null, val preferExchanges: List<String>? = null, val allowDestinationCall: Boolean? = null, val fromAmountForGas: String? = null, val maxPriceImpact: Double? = null, val swapStepTimingStrategies: List<String>? = null, val routeTimingStrategies: List<String>? = null, val skipSimulation: Boolean? = null)

Used to request a quote for a transfer of one token to another, cross chain or not

Constructors

Link copied to clipboard
constructor(fromChain: String, toChain: String, fromToken: String, toToken: String, fromAddress: String, fromAmount: String, toAddress: String? = null, order: LifiQuoteOrder? = null, slippage: Double? = null, integrator: String? = null, fee: Double? = null, referrer: String? = null, allowBridges: List<String>? = null, allowExchanges: List<String>? = null, denyBridges: List<String>? = null, denyExchanges: List<String>? = null, preferBridges: List<String>? = null, preferExchanges: List<String>? = null, allowDestinationCall: Boolean? = null, fromAmountForGas: String? = null, maxPriceImpact: Double? = null, swapStepTimingStrategies: List<String>? = null, routeTimingStrategies: List<String>? = null, skipSimulation: Boolean? = null)

Properties

Link copied to clipboard
val allowBridges: List<String>? = null

List of bridges that are allowed for this transaction

Link copied to clipboard

Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer (default: true)

Link copied to clipboard
val allowExchanges: List<String>? = null

List of exchanges that are allowed for this transaction

Link copied to clipboard
val denyBridges: List<String>? = null

List of bridges that are not allowed for this transaction

Link copied to clipboard
val denyExchanges: List<String>? = null

List of exchanges that are not allowed for this transaction

Link copied to clipboard
val fee: Double? = null

The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. Range: 0 <= x < 1

Link copied to clipboard

The sending wallet address (required)

Link copied to clipboard

The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) (required)

Link copied to clipboard

The amount of the token to convert to gas on the destination side

Link copied to clipboard

The sending chain. Can be the chain id or chain key (required)

Link copied to clipboard

The token that should be transferred. Can be the address or the symbol (required)

Link copied to clipboard
val integrator: String? = null

A string containing tracking information about the integrator of the API

Link copied to clipboard
val maxPriceImpact: Double? = null

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%.

Link copied to clipboard
val order: LifiQuoteOrder? = null

Which kind of route should be preferred (FASTEST or CHEAPEST)

Link copied to clipboard
val preferBridges: List<String>? = null

List of bridges that should be preferred for this transaction

Link copied to clipboard

List of exchanges that should be preferred for this transaction

Link copied to clipboard
val referrer: String? = null

A string containing tracking information about the referrer of the integrator

Link copied to clipboard

Timing setting to wait for a certain amount of routes to be generated before choosing the best one. Format: "minWaitTime-

${minWaitTimeMs}-$

{startingExpectedResults}-${reduceEveryMs}"

Link copied to clipboard
val skipSimulation: Boolean? = null

Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate.

Link copied to clipboard
val slippage: Double? = null

The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%. Range: 0 <= x <= 1

Link copied to clipboard

Timing setting to wait for a certain amount of swap rates. Format: "minWaitTime-

${minWaitTimeMs}-$

{startingExpectedResults}-${reduceEveryMs}"

Link copied to clipboard
val toAddress: String? = null

The receiving wallet address. If none is provided, the fromAddress will be used

Link copied to clipboard

The receiving chain. Can be the chain id or chain key (required)

Link copied to clipboard

The token that should be transferred to. Can be the address or the symbol (required)