executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
lifiUse LI.FI API for cross-chain and same-chain swaps, bridges, and contract calls. Use when quoting routes, validating chains/tokens, building transaction requests, and tracking status.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use the LI.FI API to fetch cross-chain and same-chain swap/bridge data, then use transactionRequest returned by the API to build a transaction request that can be submitted by a wallet.
https://li.questx-lifi-api-key header using LIFI_API_KEY when available; otherwise public access may be rate-limited.Action: GET /chains
Request example:
curl --request GET \
--url https://li.quest/v1/chains \
--header 'x-lifi-api-key: LIFI_API_KEY'
Action: GET /tokens
Description: This endpoint can be used to fetch all tokens known to the LI.FI services..
Request example:
curl --request GET \
--url 'https://li.quest/v1/tokens?chains=1' \
--header 'x-lifi-api-key: LIFI_API_KEY'
Action: GET /quote
Description: 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.
Request example:
curl --request GET \
--url 'https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=ETH&toToken=USD&fromAddress=0x123..&toAddress=0x456..&fromAmount=1000000&slippage=0.005' \
--header 'x-lifi-api-key: LIFI_API_KEY'
Action: POST /quote/contractCalls
Description: This endpoint can be used to bridge tokens, swap them and perform a number or arbitrary contract calls on the destination chain. You can find an example of it here. This functionality is currently in beta. While we've worked hard to ensure its stability and functionality, there might still be some rough edges.
Request example:
curl --request POST \
--url https://li.quest/v1/quote/contractCalls \
--header 'Content-Type: application/json' \
--header 'x-lifi-api-key: LIFI_API_KEY' \
--data '
{
"fromChain": 10,
"fromToken": "0x4200000000000000000000000000000000000042",
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toChain": 1,
"toToken": "ETH",
"toAmount": "100000000000001",
"contractCalls": [
{
"fromAmount": "100000000000001",
"fromTokenAddress": "0x0000000000000000000000000000000000000000",
"toTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toContractAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toContractCallData": "0x",
"toContractGasLimit": "110000"
},
{
"fromAmount": "100000000000000",
"fromTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toTokenAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"toContractAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"toFallbackAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toContractCallData": "0xea598cb000000000000000000000000000000000000000000000000000005af3107a4000",
"toContractGasLimit": "100000"
}
],
"integrator": "muc-hackaton-postman"
}
'}'
Action: GET /status
Description: Cross chain transfers might take a while to complete. Waiting on the transaction on the sending chain doesn't help here. For this reason we build a simple endpoint that let's you check the status of your transfer. Important: The endpoint returns a 200 successful response even if the transaction can not be found. This behavior accounts for the case that the transaction hash is valid but the transaction has not been mined yet. While non of the parameters fromChain, toChain and bridge are required, passing the fromChain parameter will speed up the request and is therefore encouraged.
Request example:
curl --request GET \
--url 'https://li.quest/v1/status?txHash=0x123..' \
--header 'x-lifi-api-key: LIFI_API_KEY'
Action: POST /advanced/routes
Description: In order to execute any transfer, you must first request possible Routes. From the result set a Route can be selected and executed by retrieving the transaction for every included Step using the /steps/transaction endpoint.
Request example:
curl --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'Content-Type: application/json' \
--header 'x-lifi-api-key: LIFI_API_KEY' \
--data '
{
"fromChainId": 100,
"fromAmount": "1000000000000000000",
"fromTokenAddress": "0x0000000000000000000000000000000000000000",
"toChainId": 137,
"toTokenAddress": "0x0000000000000000000000000000000000000000",
"options": {
"integrator": "fee-demo",
"referrer": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"slippage": 0.003,
"fee": 0.02,
"bridges": {
"allow": [
"relay"
]
},
"exchanges": {
"allow": [
"1inch",
"openocean"
]
},
"allowSwitchChain": true,
"order": "CHEAPEST",
"maxPriceImpact": 0.1
}
}
'
Action: GET /tools
Description: This endpoint can be used to get information about the bridges and exchanges available trough LI.FI.
Request example:
curl --request GET \
--url 'https://li.quest/v1/tools?chains=1&chains=2&chains=3' \
--header 'x-lifi-api-key: LIFI_API_KEY'
llm documentation: https://docs.li.fi/llms.txt openapi spec: https://gist.githubusercontent.com/kenny-io/7fede47200a757195000bfbe14c5baee/raw/725cf9d4a6920d5b930925b0412d766aa53c701c/lifi-openapi.yaml