xFai API Reference

Get Quote

POST /protocol/get-protocol-quotes

Fetch the quote for adding liquidity into xFai from any chain using any token.

Base URL

https://api.pod.routerintents.com

Body

{
    "ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
    "SourceTokens": [
        {
            "chainId": "42161",
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 6
        }
    ],
    "DestinationTokens": [
        {
            "chainId": "59144",
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 18
        },
        {
            "chainId": "59144",
            "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
            "name": "USDT",
            "symbol": "USDT",
            "decimals": 6
        }
    ],
    "Amount": [
        "4000000000000000"
    ],
    "SourceChainId": 42161,
    "Protocol": [
        {
            "protocolId": "xfai",
            "chainId": "59144",
            "action": "deposit",
            "poolId": ""
        }
    ]
}
Name
Type
Description

ReceiverAddress

string (required)

Wallet address to receive the LP token

SourceTokens

array (required)

Array of tokens provided by the user on the source side

Amount

array (required)

Array of token amounts being supplied

DestinationTokens

array (required)

Array of tokens for which the liquidity needs to be added

SourceChainId

int (required)

Network ID of the starting chain, for example: 42161 for Arbitrum

Protocol

object (required)

Intent adapter information for xFai

SenderAddress

string (optional)

If SenderAddress is different from the ReceiverAddress

SlippageTolerance

float (optional)

1 means 1%; by default, this is set to 2%.

// For protocol, pass the following:
{
    "protocolId": "xfai",
    "chainId": "59144",
    "action": "deposit",
    "poolId": "",
}

Response

{
    "Code": 0,
    "Errors": [],
    "PayLoad": {
        "appId": "0",
        "quotationType": "BatchTransaction",
        "slippageTolerance": 2,
        "sourceTokens": [
            {
                "chainId": "42161",
                "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "name": "ETH",
                "symbol": "ETH",
                "decimals": 6
            }
        ],
        "amount": [
            "4000000000000000"
        ],
        "sourceChainId": 42161,
        "destinationChainId": 59144,
        "destinationToken": "0xB694ce4c96fb60DB5ad8b25dfF567c59f7a49a4E",
        "adapters": [
            {
                "adapterId": "nitro_bridge",
                "adapterType": "bridge",
                "sourceChainId": 42161,
                "destChainId": "59144",
                "adapterOptions": {
                    "srcToken": {
                        "chainId": "42161",
                        "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                        "name": "ETH",
                        "symbol": "ETH",
                        "decimals": 6
                    },
                    "amountIn": "4000000000000000",
                    "amountOut": "12290445",
                    "destToken": {
                        "chainId": "59144",
                        "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                        "name": "USDT",
                        "symbol": "USDT",
                        "decimals": 6
                    },
                    "receiverAddress": "0x2312574cC99535eE8febBE516C14A295A560706e",
                    "data": {
                        "actionType": 1,
                        "refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                        "partnerId": 140,
                        "tokens": [
                            "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                            "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
                        ],
                        "bridgeFee": {
                            "amount": "864929",
                            "decimals": 6,
                            "symbol": "USDT",
                            "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
                        },
                        "isMainnet": true,
                        "quotationParams": {
                            "fromTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                            "toTokenAddress": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                            "amount": "4000000000000000",
                            "fromTokenChainId": 42161,
                            "toTokenChainId": "59144",
                            "partnerId": 140,
                            "additionalGasLimit": 2500000,
                            "slippageTolerance": 3
                        },
                        "forwarderQuotation": {
                            "flowType": "trustless",
                            "isTransfer": "false",
                            "isWrappedToken": false,
                            "allowanceTo": "0xCA94d8C245601B152C904f42fE788B4125f5b46B",
                            "bridgeFee": {
                                "amount": "864929",
                                "decimals": 6,
                                "symbol": "USDT",
                                "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
                            },
                            "fuelTransfer": null,
                            "fromTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                            "toTokenAddress": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                            "source": {
                                "chainId": "42161",
                                "chainType": "evm",
                                "asset": {
                                    "decimals": 18,
                                    "symbol": "WETH",
                                    "name": "WETH",
                                    "chainId": "42161",
                                    "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
                                    "resourceID": "native-eth",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false,
                                    "tokenInstance": {
                                        "decimals": 18,
                                        "symbol": "WETH",
                                        "name": "WETH",
                                        "chainId": 42161,
                                        "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
                                    }
                                },
                                "stableReserveAsset": {
                                    "decimals": 6,
                                    "symbol": "USDT",
                                    "name": "Tether USD",
                                    "chainId": "42161",
                                    "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
                                    "resourceID": "usdt",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false
                                },
                                "tokenAmount": "4000000000000000",
                                "stableReserveAmount": "13279520",
                                "path": [
                                    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                                    "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
                                ],
                                "flags": [
                                    "4002"
                                ],
                                "priceImpact": "0.00",
                                "tokenPath": "WETH->USDT",
                                "dataTx": [
                                    "0x90411a3200000000000000000000000066398e8b1e02291381d049c0c932394d5f2fc7ac000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb900000000000000000000000066398e8b1e02291381d049c0c932394d5f2fc7ac000000000000000000000000ca94d8c245601b152c904f42fe788b4125f5b46b000000000000000000000000000000000000000000000000000e35fa931a00000000000000000000000000000000000000000000000000000000000000caa1200000000000000000000000000000000000000000000000000000000000cdb7130000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb00000000000000000000000048d7e1a9d652ba5f5d80a8dc396df37993659f350000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000e35fa931a000000000000000000000000000066398e8b1e02291381d049c0c932394d5f2fc7ac00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e82af49447d8a07e3bd95bd0d56f35241523fbab10001c2ff970a61a04b1ca14834a43f5de4533ebddb5cc800000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc800000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb000000000000000000000000941f4ac07d2526258fc9a07a6c9a23715968b4190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000066398e8b1e02291381d049c0c932394d5f2fc7ac00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002eff970a61a04b1ca14834a43f5de4533ebddb5cc8000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb90000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e85000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a00000000000000000000000000000000000000000000000000000000000cdb71300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb900000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9000000000000000000000000ca94d8c245601b152c904f42fe788b4125f5b46b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                                ]
                            },
                            "destination": {
                                "chainId": "59144",
                                "chainType": "evm",
                                "asset": {
                                    "decimals": 6,
                                    "symbol": "USDT",
                                    "name": "USDT",
                                    "chainId": "59144",
                                    "address": "0xA219439258ca9da29E9Cc4cE5596924745e12B93",
                                    "resourceID": "usdt",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false,
                                    "tokenInstance": {
                                        "decimals": 6,
                                        "symbol": "USDT",
                                        "name": "USDT",
                                        "chainId": 59144,
                                        "address": "0xA219439258ca9da29E9Cc4cE5596924745e12B93"
                                    }
                                },
                                "stableReserveAsset": {
                                    "decimals": 6,
                                    "symbol": "USDT",
                                    "name": "USDT",
                                    "chainId": "59144",
                                    "address": "0xA219439258ca9da29E9Cc4cE5596924745e12B93",
                                    "resourceID": "usdt",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false
                                },
                                "tokenAmount": "12414591",
                                "stableReserveAmount": "12414591",
                                "priceImpact": "0.00",
                                "tokenPath": "USDT",
                                "dataTx": [
                                    "0x00"
                                ],
                                "path": [
                                    "0xa219439258ca9da29e9cc4ce5596924745e12b93"
                                ],
                                "flags": [
                                    "4002"
                                ]
                            },
                            "partnerId": "140",
                            "slippageTolerance": "3",
                            "estimatedTime": 40
                        },
                        "destinationAmount": "12414591",
                        "destinationAmountPromised": "12290445"
                    }
                },
                "adapters": [
                    {
                        "adapterId": "dex_swap",
                        "adapterType": "swap",
                        "sourceChainId": "59144",
                        "destChainId": "59144",
                        "adapterOptions": {
                            "srcToken": {
                                "chainId": "59144",
                                "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                                "name": "USDT",
                                "symbol": "USDT",
                                "decimals": 6
                            },
                            "amountIn": "6114497",
                            "amountOut": "1814565519049490",
                            "destToken": {
                                "chainId": "59144",
                                "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                                "name": "ETH",
                                "symbol": "ETH",
                                "decimals": 18
                            },
                            "receiverAddress": "0x2312574cC99535eE8febBE516C14A295A560706e",
                            "data": {
                                "tokens": [
                                    "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                                    "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
                                ],
                                "flags": [
                                    "4002"
                                ],
                                "dataTx": [
                                    "0x90411a32000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000a219439258ca9da29e9cc4ce5596924745e12b93000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade0000000000000000000000006d6050ca1dd8e4aab9164b663d805104a3ecfc3400000000000000000000000000000000000000000000000000000000005d4cc1000000000000000000000000000000000000000000000000000640d3dd30677500000000000000000000000000000000000000000000000000067256752f43120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000001947b87d35e9f1cd53cede1ad6f7be44c12212b8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000005d4cc1000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002ea219439258ca9da29e9cc4ce5596924745e12b93000064e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e85000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a000000000000000000000000000000000000000000000000000067256752f431200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f0000000000000000000000006d6050ca1dd8e4aab9164b663d805104a3ecfc3400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                                ],
                                "sourceStableReserveAmount": "1814565519049490",
                                "sourceStableReserveToken": {
                                    "decimals": 18,
                                    "symbol": "WETH",
                                    "name": "WETH",
                                    "chainId": "59144",
                                    "address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
                                    "resourceID": "native-eth",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false,
                                    "tokenInstance": {
                                        "decimals": 18,
                                        "symbol": "WETH",
                                        "name": "WETH",
                                        "chainId": 59144,
                                        "address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"
                                    }
                                },
                                "slippageTolerance": "3",
                                "partnerId": 140
                            }
                        },
                        "adapters": []
                    },
                    {
                        "adapterId": "xfai_deposit",
                        "adapterType": "amm",
                        "sourceChainId": "59144",
                        "destChainId": "59144",
                        "adapterOptions": {
                            "receiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                            "data": {
                                "refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                                "tokenA": {
                                    "chainId": "59144",
                                    "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                                    "name": "ETH",
                                    "symbol": "ETH",
                                    "decimals": 18
                                },
                                "tokenB": {
                                    "chainId": "59144",
                                    "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                                    "name": "USDT",
                                    "symbol": "USDT",
                                    "decimals": 6
                                },
                                "amountACal": "6114497",
                                "amountBCal": "6114497",
                                "amountADesired": "1814565519049490",
                                "amountBDesired": "6114497",
                                "amountAMin": "1814565519049",
                                "amountBMin": "6114",
                                "to": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                                "deadline": 1719323151275,
                                "poolData": {
                                    "tokenA": {
                                        "chainId": "59144",
                                        "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                                        "name": "ETH",
                                        "symbol": "ETH",
                                        "decimals": 18
                                    },
                                    "tokenB": {
                                        "chainId": "59144",
                                        "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                                        "name": "USDT",
                                        "symbol": "USDT",
                                        "decimals": 6
                                    },
                                    "chainId": "59144",
                                    "poolAddress": "0xB694ce4c96fb60DB5ad8b25dfF567c59f7a49a4E",
                                    "poolFactory": "0xa5136eAd459F0E61C99Cec70fe8F5C24cF3ecA26"
                                }
                            }
                        },
                        "adapters": []
                    }
                ]
            }
        ],
        "quote": [
            {
                "amountSent": "4000000000000000",
                "amountReceived": "12290445",
                "amountReceivedInEther": "12.290445",
                "exchangeRate": "",
                "estimatedTime": 40,
                "slippageTolerance": "3",
                "srcToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "destToken": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                "adapterId": "nitro_bridge",
                "bridgeFee": {
                    "amount": "864929",
                    "decimals": 6,
                    "symbol": "USDT",
                    "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
                }
            },
            {
                "amountSent": "6114497",
                "amountReceived": "1814565519049490",
                "amountReceivedInEther": "0.001815",
                "exchangeRate": 1,
                "estimatedTime": 40,
                "slippageTolerance": "3",
                "srcToken": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
                "destToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
                "adapterId": "dex_swap"
            },
            {
                "amountSent": 0,
                "amountReceived": 0,
                "amountReceivedInEther": 0,
                "srcToken": "",
                "destToken": "",
                "adapterId": "xfai_deposit",
                "estimatedTime": 0
            }
        ],
        "clientAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
        "senderAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
        "estimatedTime": 80
    }
}

Sample cURL

curl --location 'https://api.pod.routerintents.com/router-intent/protocol/get-protocol-quotes' \
--header 'Accept: */*' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'Origin: https://poc-intents-ui.vercel.app' \
--header 'Referer: https://poc-intents-ui.vercel.app/' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: cross-site' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' \
--header 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--data '{
    "ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
    "SourceTokens": [
        {
            "chainId": "42161",
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 6
        }
    ],
    "DestinationTokens": [
        {
            "chainId": "59144",
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 18
        },
        {
            "chainId": "59144",
            "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93",
            "name": "USDT",
            "symbol": "USDT",
            "decimals": 6
        }
    ],
    "Amount": [
        "4000000000000000"
    ],
    "SourceChainId": 42161,
    "Protocol": [
        {
            "protocolId": "xfai",
            "chainId": "59144",
            "action": "deposit",
            "poolId": ""
        }
    ]
}'


Compose Calldata

POST /adapter/compose-adapter-calldata

Fetch the calldata to execute the quote fetched via the get-protocol-quotes endpoint

Base URL

https://api.pod.routerintents.com

Body

Payload object from the response of the get-protocol-quotes endpoint

Response

{
    "Code": 0,
    "Errors": [],
    "PayLoad": {
        "trnxId": "b40ade18-8490-4f55-b496-09a4411b52b8",
        "gasPrice": "1099032",
        "calldata": "0xabcd",
        "to": "0xc304C00001c2fe8feDeE8b49428eB180c34CB3F6",
        "from": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
        "value": "4000000000000000",
        "prioritySteps": [],
        "gasLimit": "7500000"
    }
}

Notes:

  • In the payload, prioritySteps will contain the approval transaction calldata that needs to be executed before performing the transaction.

  • The estimated gasLimit sent by our APIs are not based on any simulations because it is not possible to simulate gasLimit without having token allowance. The gasLimit sent by our APIs is a highly conservative estimate of the gas that a tx could use. Since the actual gas limit will be much lower, we suggest that the API users estimate the gasLimit themselves once the approval tx is mined.

Last updated