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 relay
. 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 relay
. 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 relay
. 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.
Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate.
Response
The step populated with the transaction data
Object that represents one step of a Route
Unique identifier of the step
The type of the step
swap
, cross
, lifi
The tool used for this step. E.g. relay
The action of the step
{
"fromChainId": 100,
"fromAmount": "1000000000000000000",
"fromToken": {
"address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
"symbol": "MIVA",
"decimals": 18,
"chainId": 100,
"name": "Minerva Wallet SuperToken",
"coinKey": "MIVA",
"priceUSD": "0.0455272371751059",
"logoURI": ""
},
"toChainId": 137,
"toToken": {
"address": "0xc0b2983a17573660053beeed6fdb1053107cf387",
"symbol": "MIVA",
"decimals": 18,
"chainId": 137,
"name": "Minerva Wallet SuperToken",
"coinKey": "MIVA",
"priceUSD": "0",
"logoURI": ""
},
"slippage": 0.003
}
The details of the tool used for this step. E.g. relay
The estimation for the step
{
"fromAmount": "1000000000000000000",
"toAmount": "999500000000000000",
"toAmountMin": "999500000000000000",
"tool": "allbridge",
"executionDuration": 60,
"approvalAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",
"feeCosts": [
{
"name": "Gas Fee",
"description": "Covers gas expense for sending funds to user on receiving chain.",
"percentage": "0",
"token": {
"address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
"symbol": "MIVA",
"decimals": 18,
"chainId": 100,
"name": "Minerva Wallet SuperToken",
"coinKey": "MIVA",
"priceUSD": "0.0455272371751059",
"logoURI": ""
},
"amount": "0",
"amountUSD": "0.00",
"included": true
},
{
"name": "Relay Fee",
"description": "Covers gas expense for claiming user funds on receiving chain.",
"percentage": "0",
"token": {
"address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
"symbol": "MIVA",
"decimals": 18,
"chainId": 100,
"name": "Minerva Wallet SuperToken",
"coinKey": "MIVA",
"priceUSD": "0.0455272371751059",
"logoURI": ""
},
"amount": "0",
"amountUSD": "0.00",
"included": true
},
{
"name": "Router Fee",
"description": "Router service fee.",
"percentage": "0.0005",
"token": {
"address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
"symbol": "MIVA",
"decimals": 18,
"chainId": 100,
"name": "Minerva Wallet SuperToken",
"coinKey": "MIVA",
"priceUSD": "0.0455272371751059",
"logoURI": ""
},
"amount": "500000000000000",
"amountUSD": "22763618587552.95",
"included": true
}
],
"gasCosts": [
{
"type": "SEND",
"price": "1.22",
"estimate": "140000",
"limit": "175000",
"amount": "170800",
"amountUSD": "0.00",
"token": {
"address": "0x0000000000000000000000000000000000000000",
"symbol": "xDai",
"decimals": 18,
"chainId": 100,
"name": "xDai",
"coinKey": "xDai",
"priceUSD": "1",
"logoURI": "https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png"
}
}
],
"data": {
"bid": {
"user": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E",
"router": "0xeE2Ef40F688607CB23618d9312d62392786d13EB",
"initiator": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E",
"sendingChainId": 100,
"sendingAssetId": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
"amount": "1000000000000000000",
"receivingChainId": 137,
"receivingAssetId": "0xc0b2983a17573660053beeed6fdb1053107cf387",
"amountReceived": "999500000000000000",
"receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E",
"transactionId": "0x9f54c1764e19367c44706f4a6253941b81e9ec524af5590091aa8ae67e7644ed",
"expiry": 1643369368,
"callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"callTo": "0x0000000000000000000000000000000000000000",
"encryptedCallData": "0x",
"sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",
"receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113",
"bidExpiry": 1643110469
},
"gasFeeInReceivingToken": "0",
"totalFee": "500000000000000",
"metaTxRelayerFee": "0",
"routerFee": "500000000000000"
}
}
A string containing tracking information about the integrator of the API
A string containing tracking information about the referrer of the integrator
An objection containing status information about the execution
An ether.js TransactionRequest that can be triggered using a wallet provider. (https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest)