Skip to main content
POST
/
v1
/
advanced
/
stepTransaction
Populate a step with transaction data
curl --request POST \
  --url https://li.quest/v1/advanced/stepTransaction \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",
  "type": "lifi",
  "tool": "1inch",
  "toolDetails": {
    "key": "1inch",
    "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",
    "name": "1inch"
  },
  "action": {
    "fromChainId": 100,
    "toChainId": 100,
    "fromToken": {
      "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"
    },
    "toToken": {
      "name": "Minerva Wallet SuperToken",
      "symbol": "MIVA",
      "coinKey": "MIVA",
      "decimals": 18,
      "chainId": 100,
      "priceUSD": "1",
      "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",
      "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
    },
    "fromAmount": "1000000000000000000",
    "slippage": 0.003,
    "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
    "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"
  },
  "estimate": {
    "fromAmount": "1000000000000000000",
    "toAmount": "21922914496086353975",
    "toAmountMin": "21265227061203763356",
    "tool": "1inch",
    "executionDuration": 30,
    "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",
    "feeCosts": [],
    "gasCosts": [
      {
        "type": "SEND",
        "price": "1",
        "estimate": "252364",
        "limit": "315455",
        "amount": "252364",
        "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"
        }
      }
    ]
  },
  "integrator": "fee-demo",
  "includedSteps": [
    {
      "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",
      "type": "swap",
      "tool": "1inch",
      "toolDetails": {
        "key": "1inch",
        "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",
        "name": "1inch"
      },
      "action": {
        "fromChainId": 100,
        "toChainId": 100,
        "fromToken": {
          "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"
        },
        "toToken": {
          "name": "Minerva Wallet SuperToken",
          "symbol": "MIVA",
          "coinKey": "MIVA",
          "decimals": 18,
          "chainId": 100,
          "priceUSD": "1",
          "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",
          "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
        },
        "fromAmount": "1000000000000000000",
        "slippage": 0.003,
        "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
        "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"
      },
      "estimate": {
        "fromAmount": "1000000000000000000",
        "toAmount": "21922914496086353975",
        "toAmountMin": "21265227061203763356",
        "tool": "1inch",
        "executionDuration": 30,
        "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",
        "feeCosts": [],
        "gasCosts": [
          {
            "type": "SEND",
            "price": "1",
            "estimate": "252364",
            "limit": "315455",
            "amount": "252364",
            "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"
            }
          }
        ]
      }
    }
  ]
}
'
import requests

url = "https://li.quest/v1/advanced/stepTransaction"

payload = {
"id": "a8dc011a-f52d-4492-9e99-21de64b5453a",
"type": "lifi",
"tool": "1inch",
"toolDetails": {
"key": "1inch",
"logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",
"name": "1inch"
},
"action": {
"fromChainId": 100,
"toChainId": 100,
"fromToken": {
"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"
},
"toToken": {
"name": "Minerva Wallet SuperToken",
"symbol": "MIVA",
"coinKey": "MIVA",
"decimals": 18,
"chainId": 100,
"priceUSD": "1",
"logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",
"address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
},
"fromAmount": "1000000000000000000",
"slippage": 0.003,
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"
},
"estimate": {
"fromAmount": "1000000000000000000",
"toAmount": "21922914496086353975",
"toAmountMin": "21265227061203763356",
"tool": "1inch",
"executionDuration": 30,
"approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",
"feeCosts": [],
"gasCosts": [
{
"type": "SEND",
"price": "1",
"estimate": "252364",
"limit": "315455",
"amount": "252364",
"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"
}
}
]
},
"integrator": "fee-demo",
"includedSteps": [
{
"id": "a8dc011a-f52d-4492-9e99-21de64b5453a",
"type": "swap",
"tool": "1inch",
"toolDetails": {
"key": "1inch",
"logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",
"name": "1inch"
},
"action": {
"fromChainId": 100,
"toChainId": 100,
"fromToken": {
"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"
},
"toToken": {
"name": "Minerva Wallet SuperToken",
"symbol": "MIVA",
"coinKey": "MIVA",
"decimals": 18,
"chainId": 100,
"priceUSD": "1",
"logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",
"address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
},
"fromAmount": "1000000000000000000",
"slippage": 0.003,
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"
},
"estimate": {
"fromAmount": "1000000000000000000",
"toAmount": "21922914496086353975",
"toAmountMin": "21265227061203763356",
"tool": "1inch",
"executionDuration": 30,
"approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",
"feeCosts": [],
"gasCosts": [
{
"type": "SEND",
"price": "1",
"estimate": "252364",
"limit": "315455",
"amount": "252364",
"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"
}
}
]
}
}
]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'a8dc011a-f52d-4492-9e99-21de64b5453a',
type: 'lifi',
tool: '1inch',
toolDetails: {
key: '1inch',
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg',
name: '1inch'
},
action: {
fromChainId: 100,
toChainId: 100,
fromToken: {
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'
},
toToken: {
name: 'Minerva Wallet SuperToken',
symbol: 'MIVA',
coinKey: 'MIVA',
decimals: 18,
chainId: 100,
priceUSD: '1',
logoURI: 'https://minerva.digital/i/MIVA-Token_200x200.png',
address: '0x63e62989d9eb2d37dfdb1f93a22f063635b07d51'
},
fromAmount: '1000000000000000000',
slippage: 0.003,
fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
toAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0'
},
estimate: {
fromAmount: '1000000000000000000',
toAmount: '21922914496086353975',
toAmountMin: '21265227061203763356',
tool: '1inch',
executionDuration: 30,
approvalAddress: '0x1111111254fb6c44bac0bed2854e76f90643097d',
feeCosts: [],
gasCosts: [
{
type: 'SEND',
price: '1',
estimate: '252364',
limit: '315455',
amount: '252364',
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'
}
}
]
},
integrator: 'fee-demo',
includedSteps: [
{
id: 'a8dc011a-f52d-4492-9e99-21de64b5453a',
type: 'swap',
tool: '1inch',
toolDetails: {
key: '1inch',
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg',
name: '1inch'
},
action: {
fromChainId: 100,
toChainId: 100,
fromToken: {
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'
},
toToken: {
name: 'Minerva Wallet SuperToken',
symbol: 'MIVA',
coinKey: 'MIVA',
decimals: 18,
chainId: 100,
priceUSD: '1',
logoURI: 'https://minerva.digital/i/MIVA-Token_200x200.png',
address: '0x63e62989d9eb2d37dfdb1f93a22f063635b07d51'
},
fromAmount: '1000000000000000000',
slippage: 0.003,
fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
toAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0'
},
estimate: {
fromAmount: '1000000000000000000',
toAmount: '21922914496086353975',
toAmountMin: '21265227061203763356',
tool: '1inch',
executionDuration: 30,
approvalAddress: '0x1111111254fb6c44bac0bed2854e76f90643097d',
feeCosts: [],
gasCosts: [
{
type: 'SEND',
price: '1',
estimate: '252364',
limit: '315455',
amount: '252364',
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'
}
}
]
}
}
]
})
};

fetch('https://li.quest/v1/advanced/stepTransaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://li.quest/v1/advanced/stepTransaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'a8dc011a-f52d-4492-9e99-21de64b5453a',
'type' => 'lifi',
'tool' => '1inch',
'toolDetails' => [
'key' => '1inch',
'logoURI' => 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg',
'name' => '1inch'
],
'action' => [
'fromChainId' => 100,
'toChainId' => 100,
'fromToken' => [
'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'
],
'toToken' => [
'name' => 'Minerva Wallet SuperToken',
'symbol' => 'MIVA',
'coinKey' => 'MIVA',
'decimals' => 18,
'chainId' => 100,
'priceUSD' => '1',
'logoURI' => 'https://minerva.digital/i/MIVA-Token_200x200.png',
'address' => '0x63e62989d9eb2d37dfdb1f93a22f063635b07d51'
],
'fromAmount' => '1000000000000000000',
'slippage' => 0.003,
'fromAddress' => '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
'toAddress' => '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0'
],
'estimate' => [
'fromAmount' => '1000000000000000000',
'toAmount' => '21922914496086353975',
'toAmountMin' => '21265227061203763356',
'tool' => '1inch',
'executionDuration' => 30,
'approvalAddress' => '0x1111111254fb6c44bac0bed2854e76f90643097d',
'feeCosts' => [

],
'gasCosts' => [
[
'type' => 'SEND',
'price' => '1',
'estimate' => '252364',
'limit' => '315455',
'amount' => '252364',
'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'
]
]
]
],
'integrator' => 'fee-demo',
'includedSteps' => [
[
'id' => 'a8dc011a-f52d-4492-9e99-21de64b5453a',
'type' => 'swap',
'tool' => '1inch',
'toolDetails' => [
'key' => '1inch',
'logoURI' => 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg',
'name' => '1inch'
],
'action' => [
'fromChainId' => 100,
'toChainId' => 100,
'fromToken' => [
'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'
],
'toToken' => [
'name' => 'Minerva Wallet SuperToken',
'symbol' => 'MIVA',
'coinKey' => 'MIVA',
'decimals' => 18,
'chainId' => 100,
'priceUSD' => '1',
'logoURI' => 'https://minerva.digital/i/MIVA-Token_200x200.png',
'address' => '0x63e62989d9eb2d37dfdb1f93a22f063635b07d51'
],
'fromAmount' => '1000000000000000000',
'slippage' => 0.003,
'fromAddress' => '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
'toAddress' => '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0'
],
'estimate' => [
'fromAmount' => '1000000000000000000',
'toAmount' => '21922914496086353975',
'toAmountMin' => '21265227061203763356',
'tool' => '1inch',
'executionDuration' => 30,
'approvalAddress' => '0x1111111254fb6c44bac0bed2854e76f90643097d',
'feeCosts' => [

],
'gasCosts' => [
[
'type' => 'SEND',
'price' => '1',
'estimate' => '252364',
'limit' => '315455',
'amount' => '252364',
'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'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://li.quest/v1/advanced/stepTransaction"

payload := strings.NewReader("{\n \"id\": \"a8dc011a-f52d-4492-9e99-21de64b5453a\",\n \"type\": \"lifi\",\n \"tool\": \"1inch\",\n \"toolDetails\": {\n \"key\": \"1inch\",\n \"logoURI\": \"https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg\",\n \"name\": \"1inch\"\n },\n \"action\": {\n \"fromChainId\": 100,\n \"toChainId\": 100,\n \"fromToken\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n },\n \"toToken\": {\n \"name\": \"Minerva Wallet SuperToken\",\n \"symbol\": \"MIVA\",\n \"coinKey\": \"MIVA\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://minerva.digital/i/MIVA-Token_200x200.png\",\n \"address\": \"0x63e62989d9eb2d37dfdb1f93a22f063635b07d51\"\n },\n \"fromAmount\": \"1000000000000000000\",\n \"slippage\": 0.003,\n \"fromAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\",\n \"toAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\"\n },\n \"estimate\": {\n \"fromAmount\": \"1000000000000000000\",\n \"toAmount\": \"21922914496086353975\",\n \"toAmountMin\": \"21265227061203763356\",\n \"tool\": \"1inch\",\n \"executionDuration\": 30,\n \"approvalAddress\": \"0x1111111254fb6c44bac0bed2854e76f90643097d\",\n \"feeCosts\": [],\n \"gasCosts\": [\n {\n \"type\": \"SEND\",\n \"price\": \"1\",\n \"estimate\": \"252364\",\n \"limit\": \"315455\",\n \"amount\": \"252364\",\n \"amountUSD\": \"0.00\",\n \"token\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n }\n }\n ]\n },\n \"integrator\": \"fee-demo\",\n \"includedSteps\": [\n {\n \"id\": \"a8dc011a-f52d-4492-9e99-21de64b5453a\",\n \"type\": \"swap\",\n \"tool\": \"1inch\",\n \"toolDetails\": {\n \"key\": \"1inch\",\n \"logoURI\": \"https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg\",\n \"name\": \"1inch\"\n },\n \"action\": {\n \"fromChainId\": 100,\n \"toChainId\": 100,\n \"fromToken\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n },\n \"toToken\": {\n \"name\": \"Minerva Wallet SuperToken\",\n \"symbol\": \"MIVA\",\n \"coinKey\": \"MIVA\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://minerva.digital/i/MIVA-Token_200x200.png\",\n \"address\": \"0x63e62989d9eb2d37dfdb1f93a22f063635b07d51\"\n },\n \"fromAmount\": \"1000000000000000000\",\n \"slippage\": 0.003,\n \"fromAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\",\n \"toAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\"\n },\n \"estimate\": {\n \"fromAmount\": \"1000000000000000000\",\n \"toAmount\": \"21922914496086353975\",\n \"toAmountMin\": \"21265227061203763356\",\n \"tool\": \"1inch\",\n \"executionDuration\": 30,\n \"approvalAddress\": \"0x1111111254fb6c44bac0bed2854e76f90643097d\",\n \"feeCosts\": [],\n \"gasCosts\": [\n {\n \"type\": \"SEND\",\n \"price\": \"1\",\n \"estimate\": \"252364\",\n \"limit\": \"315455\",\n \"amount\": \"252364\",\n \"amountUSD\": \"0.00\",\n \"token\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n }\n }\n ]\n }\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://li.quest/v1/advanced/stepTransaction")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"a8dc011a-f52d-4492-9e99-21de64b5453a\",\n \"type\": \"lifi\",\n \"tool\": \"1inch\",\n \"toolDetails\": {\n \"key\": \"1inch\",\n \"logoURI\": \"https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg\",\n \"name\": \"1inch\"\n },\n \"action\": {\n \"fromChainId\": 100,\n \"toChainId\": 100,\n \"fromToken\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n },\n \"toToken\": {\n \"name\": \"Minerva Wallet SuperToken\",\n \"symbol\": \"MIVA\",\n \"coinKey\": \"MIVA\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://minerva.digital/i/MIVA-Token_200x200.png\",\n \"address\": \"0x63e62989d9eb2d37dfdb1f93a22f063635b07d51\"\n },\n \"fromAmount\": \"1000000000000000000\",\n \"slippage\": 0.003,\n \"fromAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\",\n \"toAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\"\n },\n \"estimate\": {\n \"fromAmount\": \"1000000000000000000\",\n \"toAmount\": \"21922914496086353975\",\n \"toAmountMin\": \"21265227061203763356\",\n \"tool\": \"1inch\",\n \"executionDuration\": 30,\n \"approvalAddress\": \"0x1111111254fb6c44bac0bed2854e76f90643097d\",\n \"feeCosts\": [],\n \"gasCosts\": [\n {\n \"type\": \"SEND\",\n \"price\": \"1\",\n \"estimate\": \"252364\",\n \"limit\": \"315455\",\n \"amount\": \"252364\",\n \"amountUSD\": \"0.00\",\n \"token\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n }\n }\n ]\n },\n \"integrator\": \"fee-demo\",\n \"includedSteps\": [\n {\n \"id\": \"a8dc011a-f52d-4492-9e99-21de64b5453a\",\n \"type\": \"swap\",\n \"tool\": \"1inch\",\n \"toolDetails\": {\n \"key\": \"1inch\",\n \"logoURI\": \"https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg\",\n \"name\": \"1inch\"\n },\n \"action\": {\n \"fromChainId\": 100,\n \"toChainId\": 100,\n \"fromToken\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n },\n \"toToken\": {\n \"name\": \"Minerva Wallet SuperToken\",\n \"symbol\": \"MIVA\",\n \"coinKey\": \"MIVA\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://minerva.digital/i/MIVA-Token_200x200.png\",\n \"address\": \"0x63e62989d9eb2d37dfdb1f93a22f063635b07d51\"\n },\n \"fromAmount\": \"1000000000000000000\",\n \"slippage\": 0.003,\n \"fromAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\",\n \"toAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\"\n },\n \"estimate\": {\n \"fromAmount\": \"1000000000000000000\",\n \"toAmount\": \"21922914496086353975\",\n \"toAmountMin\": \"21265227061203763356\",\n \"tool\": \"1inch\",\n \"executionDuration\": 30,\n \"approvalAddress\": \"0x1111111254fb6c44bac0bed2854e76f90643097d\",\n \"feeCosts\": [],\n \"gasCosts\": [\n {\n \"type\": \"SEND\",\n \"price\": \"1\",\n \"estimate\": \"252364\",\n \"limit\": \"315455\",\n \"amount\": \"252364\",\n \"amountUSD\": \"0.00\",\n \"token\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n }\n }\n ]\n }\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://li.quest/v1/advanced/stepTransaction")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"a8dc011a-f52d-4492-9e99-21de64b5453a\",\n \"type\": \"lifi\",\n \"tool\": \"1inch\",\n \"toolDetails\": {\n \"key\": \"1inch\",\n \"logoURI\": \"https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg\",\n \"name\": \"1inch\"\n },\n \"action\": {\n \"fromChainId\": 100,\n \"toChainId\": 100,\n \"fromToken\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n },\n \"toToken\": {\n \"name\": \"Minerva Wallet SuperToken\",\n \"symbol\": \"MIVA\",\n \"coinKey\": \"MIVA\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://minerva.digital/i/MIVA-Token_200x200.png\",\n \"address\": \"0x63e62989d9eb2d37dfdb1f93a22f063635b07d51\"\n },\n \"fromAmount\": \"1000000000000000000\",\n \"slippage\": 0.003,\n \"fromAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\",\n \"toAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\"\n },\n \"estimate\": {\n \"fromAmount\": \"1000000000000000000\",\n \"toAmount\": \"21922914496086353975\",\n \"toAmountMin\": \"21265227061203763356\",\n \"tool\": \"1inch\",\n \"executionDuration\": 30,\n \"approvalAddress\": \"0x1111111254fb6c44bac0bed2854e76f90643097d\",\n \"feeCosts\": [],\n \"gasCosts\": [\n {\n \"type\": \"SEND\",\n \"price\": \"1\",\n \"estimate\": \"252364\",\n \"limit\": \"315455\",\n \"amount\": \"252364\",\n \"amountUSD\": \"0.00\",\n \"token\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n }\n }\n ]\n },\n \"integrator\": \"fee-demo\",\n \"includedSteps\": [\n {\n \"id\": \"a8dc011a-f52d-4492-9e99-21de64b5453a\",\n \"type\": \"swap\",\n \"tool\": \"1inch\",\n \"toolDetails\": {\n \"key\": \"1inch\",\n \"logoURI\": \"https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg\",\n \"name\": \"1inch\"\n },\n \"action\": {\n \"fromChainId\": 100,\n \"toChainId\": 100,\n \"fromToken\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n },\n \"toToken\": {\n \"name\": \"Minerva Wallet SuperToken\",\n \"symbol\": \"MIVA\",\n \"coinKey\": \"MIVA\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://minerva.digital/i/MIVA-Token_200x200.png\",\n \"address\": \"0x63e62989d9eb2d37dfdb1f93a22f063635b07d51\"\n },\n \"fromAmount\": \"1000000000000000000\",\n \"slippage\": 0.003,\n \"fromAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\",\n \"toAddress\": \"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0\"\n },\n \"estimate\": {\n \"fromAmount\": \"1000000000000000000\",\n \"toAmount\": \"21922914496086353975\",\n \"toAmountMin\": \"21265227061203763356\",\n \"tool\": \"1inch\",\n \"executionDuration\": 30,\n \"approvalAddress\": \"0x1111111254fb6c44bac0bed2854e76f90643097d\",\n \"feeCosts\": [],\n \"gasCosts\": [\n {\n \"type\": \"SEND\",\n \"price\": \"1\",\n \"estimate\": \"252364\",\n \"limit\": \"315455\",\n \"amount\": \"252364\",\n \"amountUSD\": \"0.00\",\n \"token\": {\n \"address\": \"0x0000000000000000000000000000000000000000\",\n \"symbol\": \"xDai\",\n \"decimals\": 18,\n \"chainId\": 100,\n \"name\": \"xDai\",\n \"coinKey\": \"xDai\",\n \"priceUSD\": \"1\",\n \"logoURI\": \"https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png\"\n }\n }\n ]\n }\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",
  "type": "lifi",
  "tool": "1inch",
  "toolDetails": {
    "key": "1inch",
    "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",
    "name": "1inch"
  },
  "action": {
    "fromChainId": 100,
    "toChainId": 100,
    "fromToken": {
      "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"
    },
    "toToken": {
      "name": "Minerva Wallet SuperToken",
      "symbol": "MIVA",
      "coinKey": "MIVA",
      "decimals": 18,
      "chainId": 100,
      "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",
      "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
    },
    "fromAmount": "1000000000000000000",
    "slippage": 0.003,
    "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
    "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"
  },
  "estimate": {
    "fromAmount": "1000000000000000000",
    "toAmount": "21922914496086353975",
    "toAmountMin": "21265227061203763356",
    "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",
    "feeCosts": [],
    "gasCosts": [
      {
        "type": "SEND",
        "price": "1",
        "estimate": "252364",
        "limit": "315455",
        "amount": "252364",
        "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": {
      "fromToken": {
        "name": "xDAI",
        "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "symbol": "xDAI",
        "decimals": 18,
        "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"
      },
      "toToken": {
        "name": "Minerva Wallet SuperToken",
        "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
        "symbol": "MIVA",
        "decimals": 18,
        "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"
      },
      "toTokenAmount": "21922914496086353975",
      "fromTokenAmount": "1000000000000000000",
      "protocols": [
        {
          "name": "GNOSIS_HONEYSWAP",
          "part": 100,
          "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
          "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
        }
      ],
      "estimatedGas": 252364
    }
  },
  "integrator": "fee-demo",
  "transactionRequest": {
    "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
    "to": "0x1111111254fb6c44bac0bed2854e76f90643097d",
    "chainId": 100,
    "data": "0x...",
    "value": "0x0de0b6b3a7640000",
    "gasPrice": "0xb2d05e00",
    "gasLimit": "0x0e9cb2"
  },
  "includedSteps": [
    {
      "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",
      "type": "swap",
      "tool": "1inch",
      "toolDetails": {
        "key": "1inch",
        "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",
        "name": "1inch"
      },
      "action": {
        "fromChainId": 100,
        "toChainId": 100,
        "fromToken": {
          "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"
        },
        "toToken": {
          "name": "Minerva Wallet SuperToken",
          "symbol": "MIVA",
          "coinKey": "MIVA",
          "decimals": 18,
          "chainId": 100,
          "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",
          "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
        },
        "fromAmount": "1000000000000000000",
        "slippage": 0.003,
        "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
        "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"
      },
      "estimate": {
        "fromAmount": "1000000000000000000",
        "toAmount": "21922914496086353975",
        "toAmountMin": "21265227061203763356",
        "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",
        "feeCosts": [],
        "gasCosts": [
          {
            "type": "SEND",
            "price": "1",
            "estimate": "252364",
            "limit": "315455",
            "amount": "252364",
            "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": {
          "fromToken": {
            "name": "xDAI",
            "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
            "symbol": "xDAI",
            "decimals": 18,
            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"
          },
          "toToken": {
            "name": "Minerva Wallet SuperToken",
            "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
            "symbol": "MIVA",
            "decimals": 18,
            "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"
          },
          "toTokenAmount": "21922914496086353975",
          "fromTokenAmount": "1000000000000000000",
          "protocols": [
            {
              "name": "GNOSIS_HONEYSWAP",
              "part": 100,
              "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"
            }
          ],
          "estimatedGas": 252364
        }
      }
    }
  ]
}

Headers

x-lifi-api-key
string

Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.

Query Parameters

skipSimulation
boolean

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

mayanNonEvmPermitSignature
boolean

Mayan specific option to bridge from non-EVM chain to Hyperliquid

svmPriorityFeeLevel
enum<string>

Priority fee level for Solana Virtual Machine (SVM) transactions.

Available options:
NORMAL,
FAST,
ULTRA

Body

application/json

The step object

Object that represents one step of a Route

id
string
required

Unique identifier of the step

type
enum<string>
required

The type of the step. swap executes a DEX swap on a single chain, cross bridges assets between chains, lifi runs LiFi's internal multi-action logic, and protocol represents protocol-level actions such as fee collection or vault interactions executed inside LiFi managed contracts.

Available options:
swap,
cross,
lifi,
protocol
tool
string
required

The tool used for this step. E.g. relay

action
Root Type for Action Ā· object
required

The action of the step

Example:
{
"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
}
toolDetails
object

The details of the tool used for this step. E.g. relay

estimate
Root Type for Estimate Ā· object

The estimation for the step

Example:
{
"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"
}
}
integrator
string

A string containing tracking information about the integrator of the API

includedSteps
Root Type for Internal Step Ā· object[]
referrer
string

A string containing tracking information about the referrer of the integrator

execution
any

An objection containing status information about the execution

transactionRequest
any

An ether.js TransactionRequest that can be triggered using a wallet provider. (https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest)

Response

The step populated with the transaction data

Object that represents one step of a Route

id
string
required

Unique identifier of the step

type
enum<string>
required

The type of the step. swap executes a DEX swap on a single chain, cross bridges assets between chains, lifi runs LiFi's internal multi-action logic, and protocol represents protocol-level actions such as fee collection or vault interactions executed inside LiFi managed contracts.

Available options:
swap,
cross,
lifi,
protocol
tool
string
required

The tool used for this step. E.g. relay

action
Root Type for Action Ā· object
required

The action of the step

Example:
{
"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
}
toolDetails
object

The details of the tool used for this step. E.g. relay

estimate
Root Type for Estimate Ā· object

The estimation for the step

Example:
{
"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"
}
}
integrator
string

A string containing tracking information about the integrator of the API

includedSteps
Root Type for Internal Step Ā· object[]
referrer
string

A string containing tracking information about the referrer of the integrator

execution
any

An objection containing status information about the execution

transactionRequest
any

An ether.js TransactionRequest that can be triggered using a wallet provider. (https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest)