Lynex API Reference
Get Quote
POST
/protocol/get-protocol-quotes
Fetch the quote for adding liquidity into Lynex from any chain using any token.
Base URL
https://api.pod.routerintents.com
Body
{
"ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"SourceTokens": [
{
"chainId": "43114",
"address": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"DestinationTokens": [
{
"chainId": "59144",
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"name": "WETH",
"symbol": "WETH",
"decimals": 18
},
{
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"Amount": [
"100000000"
],
"SourceChainId": 43114,
"Protocol": [
{
"protocolId": "lynex",
"chainId": "59144",
"action": "deposit",
"poolId": "lynex-deposit_59144",
"data": {
"stable": false // true for stable pair
}
}
]
}
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: 43114 for Avalanche
Protocol
object (required)
Intent adapter information for Lynex
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": "lynex",
"chainId": "59144",
"action": "deposit",
"poolId": "lynex-deposit_59144",
"data": {
"stable": false // true for stable pair
}
}
Response
{
"Code": 0,
"Errors": [],
"PayLoad": {
"appId": "0",
"quotationType": "BatchTransaction",
"slippageTolerance": 2,
"sourceTokens": [
{
"chainId": "43114",
"address": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"amount": [
"100000000"
],
"sourceChainId": 43114,
"destinationChainId": 59144,
"destinationToken": {
"address": "0x1a51b19CE03dbE0Cb44C1528E34a7EDD7771E9Af",
"name": "LYNX",
"symbol": "LYNX",
"decimals": 18
},
"adapters": [
{
"adapterId": "nitro_bridge",
"adapterType": "bridge",
"sourceChainId": 43114,
"destChainId": "59144",
"adapterOptions": {
"srcToken": {
"chainId": "43114",
"address": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
},
"amountIn": "100000000",
"amountOut": "97827498",
"destToken": {
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
},
"receiverAddress": "0x2312574cC99535eE8febBE516C14A295A560706e",
"data": {
"actionType": 0,
"refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"partnerId": 108,
"tokens": [],
"bridgeFee": {
"amount": "1184345",
"decimals": 6,
"symbol": "USDC",
"address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"
},
"isMainnet": true,
"quotationParams": {
"fromTokenAddress": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"toTokenAddress": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"amount": "100000000",
"fromTokenChainId": 43114,
"toTokenChainId": "59144",
"partnerId": 108,
"additionalGasLimit": 2500000,
"slippageTolerance": 3
},
"forwarderQuotation": {
"flowType": "trustless",
"isTransfer": true,
"isWrappedToken": false,
"allowanceTo": "0xf9f4c3dc7ba8f56737a92d74fd67230c38af51f2",
"bridgeFee": {
"amount": "1184345",
"decimals": 6,
"symbol": "USDC",
"address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"
},
"fromTokenAddress": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"toTokenAddress": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"source": {
"chainId": "43114",
"chainType": "evm",
"asset": {
"decimals": 6,
"symbol": "USDC",
"name": "USDC",
"chainId": "43114",
"address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
"resourceID": "usdc-circle",
"isMintable": false,
"isWrappedAsset": false
},
"stableReserveAsset": {
"decimals": 6,
"symbol": "USDC",
"name": "USDC",
"chainId": "43114",
"address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
"resourceID": "usdc-circle",
"isMintable": false,
"isWrappedAsset": false
},
"tokenAmount": "100000000",
"stableReserveAmount": "100000000",
"path": [],
"flags": [],
"priceImpact": "0",
"tokenPath": "",
"dataTx": []
},
"destination": {
"chainId": "59144",
"chainType": "evm",
"asset": {
"decimals": 6,
"symbol": "USDC",
"name": "USDC",
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"resourceID": "usdc-circle",
"isMintable": false,
"isWrappedAsset": false
},
"stableReserveAsset": {
"decimals": 6,
"symbol": "USDC",
"name": "USDC",
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"resourceID": "usdc-circle",
"isMintable": false,
"isWrappedAsset": false
},
"tokenAmount": "98815655",
"stableReserveAmount": "98815655",
"path": [],
"flags": [],
"priceImpact": "0",
"tokenPath": "",
"dataTx": []
},
"partnerId": 108,
"fuelTransfer": null,
"slippageTolerance": "3",
"estimatedTime": 40
},
"destinationAmount": "98815655",
"destinationAmountPromised": "97827498"
}
},
"adapters": [
{
"adapterId": "dex_swap",
"adapterType": "swap",
"sourceChainId": "59144",
"destChainId": "59144",
"adapterOptions": {
"srcToken": {
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
},
"amountIn": "48669181",
"amountOut": "13955095537080080",
"destToken": {
"chainId": "59144",
"address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"name": "ETH",
"symbol": "ETH",
"decimals": 18,
"resourceID": "native-eth",
"isMintable": false,
"isWrappedAsset": false
},
"receiverAddress": "0x2312574cC99535eE8febBE516C14A295A560706e",
"data": {
"tokens": [
"0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
],
"flags": [
"4002"
],
"dataTx": [
"0x90411a32000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade0000000000000000000000006d6050ca1dd8e4aab9164b663d805104a3ecfc340000000000000000000000000000000000000000000000000000000002e6a1fd00000000000000000000000000000000000000000000000000301752a8eceb7e00000000000000000000000000000000000000000000000000319415e04b57100000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000007200000000000000000000000000000000000000000000000000000000000000a200000000000000000000000000000000000000000000000000000000000000d200000000000000000000000000000000000000000000000000000000000001020000000000000000000000000000000000000000000000000000000000000132000000000000000000000000000000000000000000000000000000000000016200000000000000000000000000000000000000000000000000000000000001740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff000000000000000000000000000000010000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000006e9ad0b8a41e2c148e7b0385d3ecbfdb8a216a9b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e176211869ca2b568f2a7d4ee941e073a821ee1ff000000a219439258ca9da29e9cc4ce5596924745e12b930000170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000a219439258ca9da29e9cc4ce5596924745e12b9300000000000000000000000000000004000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb00000000000000000000000027ed78122b8ef363f4ef5b3afe197e0c4a2fa51400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002ea219439258ca9da29e9cc4ce5596924745e12b930000fae5d7c2a44ffddf6b295a15c148167daaaf5cf34f00001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000a219439258ca9da29e9cc4ce5596924745e12b930000000000000000000000000000000b000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000005eeb3f21646b32f634bb7c4eecdb493954d5a5f300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002ea219439258ca9da29e9cc4ce5596924745e12b930001f4e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000a219439258ca9da29e9cc4ce5596924745e12b9300000000000000000000000000000005000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000009ca4ea6f392423b822898f3c1b129620161f5de700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002ea219439258ca9da29e9cc4ce5596924745e12b93000bb8e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00001d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff00000000000000000000000000000099000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000000ab43d592f8fa273ce900d8749c854419e8e145900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e176211869ca2b568f2a7d4ee941e073a821ee1ff0001f43aab2285ddcddad8edf438c1bab47e1a9d05a9b400001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f865422000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff0000000000000000000000000000001b0000000000000000000000000000001b0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000001d6cbd5ab95fcc04edde14abfa8d363adf4ead0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e176211869ca2b568f2a7d4ee941e073a821ee1ff0000003aab2285ddcddad8edf438c1bab47e1a9d05a9b40000170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002449f8654220000000000000000000000003aab2285ddcddad8edf438c1bab47e1a9d05a9b400000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb000000000000000000000000f11bb479dc3daffe63989b6b95f6c119225dac2800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000396871457fc7769f7eb850a096527ed7e8652ade00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e3aab2285ddcddad8edf438c1bab47e1a9d05a9b40000fae5d7c2a44ffddf6b295a15c148167daaaf5cf34f00001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e85000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a000000000000000000000000000000000000000000000000000319415e04b571000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f0000000000000000000000006d6050ca1dd8e4aab9164b663d805104a3ecfc3400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
],
"sourceStableReserveAmount": "13955095537080080",
"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": 2,
"partnerId": 108
}
},
"adapters": []
},
{
"adapterId": "lynex_deposit",
"adapterType": "amm",
"sourceChainId": "59144",
"destChainId": "59144",
"adapterOptions": {
"receiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"data": {
"refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"tokenA": {
"chainId": "59144",
"address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"name": "ETH",
"symbol": "ETH",
"decimals": 18,
"resourceID": "native-eth",
"isMintable": false,
"isWrappedAsset": false
},
"tokenB": {
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
},
"stable": false,
"amountACal": "48669181",
"amountBCal": "48669181",
"amountADesired": "13955095537080080",
"amountBDesired": "48669181",
"amountAMin": "13955095537080",
"amountBMin": "48669",
"to": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"deadline": 1718380951551,
"poolData": {
"tokenA": {
"chainId": "59144",
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"name": "WETH",
"symbol": "WETH",
"decimals": 18,
"resourceID": "native-eth",
"isMintable": false,
"isWrappedAsset": false
},
"tokenB": {
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
},
"chainId": "59144",
"poolAddress": "0x6FB44889a9aA69F7290258D3716BfFcB33CdE184",
"poolFactory": "0xBc7695Fd00E3b32D08124b7a4287493aEE99f9ee",
"stable": false,
"reserveA": "17319564817",
"reserveB": "4969118634305290281"
}
}
},
"adapters": []
}
]
}
],
"quote": [
{
"amountSent": "100000000",
"amountReceived": "97827498",
"amountReceivedInEther": "97.827498",
"exchangeRate": "",
"estimatedTime": 40,
"slippageTolerance": "3",
"srcToken": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"destToken": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"adapterId": "nitro_bridge",
"bridgeFee": {
"amount": "1184345",
"decimals": 6,
"symbol": "USDC",
"address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"
}
},
{
"amountSent": "48669181",
"amountReceived": "13955095537080080",
"amountReceivedInEther": "0.013955",
"exchangeRate": 1,
"estimatedTime": 40,
"slippageTolerance": "3",
"srcToken": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"destToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"adapterId": "dex_swap"
},
{
"amountSent": 0,
"amountReceived": 0,
"amountReceivedInEther": 0,
"srcToken": "",
"destToken": "",
"adapterId": "lynex_deposit",
"estimatedTime": 0
}
],
"clientAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"senderAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"estimatedTime": 80
}
}
{
"Code": 1,
"Error": [
{
"Code": "1",
"Message": [
{
"title": "",
"message": ""
}
]
}
],
"Payload": null
}
Sample cURL
curl --location 'https://api.pod.routerintents.com/router-intent/protocol/get-protocol-quotes' \
--header 'Accept: */*' \
--header 'Accept-Language: en-GB,en;q=0.7' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'Origin: https://poc.routerintents.com' \
--header 'Referer: https://poc.routerintents.com/' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: same-site' \
--header 'Sec-GPC: 1' \
--header 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36' \
--header 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Brave";v="126"' \
--header 'sec-ch-ua-mobile: ?1' \
--header 'sec-ch-ua-platform: "Android"' \
--data '{
"ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"SourceTokens": [
{
"chainId": "43114",
"address": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"DestinationTokens": [
{
"chainId": "59144",
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"name": "WETH",
"symbol": "WETH",
"decimals": 18
},
{
"chainId": "59144",
"address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"name": "USDC",
"symbol": "USDC",
"decimals": 6
}
],
"Amount": [
"100000000"
],
"SourceChainId": 43114,
"Protocol": [
{
"protocolId": "lynex",
"chainId": "59144",
"action": "deposit",
"poolId": "lynex-deposit_59144",
"data": {
"stable": false
}
}
]
}'
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": "cfd42fcc-7e14-47c2-80e1-905d52ab324b",
"gasPrice": "526550000000000",
"calldata": "0xabcd",
"to": "0x2DdFbf2527384b84c335EAe9C79Ac85fd46ED8f3",
"from": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
"value": "0x00",
"prioritySteps": [
{
"contractAddress": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
"data": "0x095ea7b30000000000000000000000002ddfbf2527384b84c335eae9c79ac85fd46ed8f30000000000000000000000000000000000000000000000000000000005f5e100",
"value": 0,
"instructionData": "Approve USDC for Batch Handler Contract",
"instructionTitle": "Approve USDC",
"chainId": "43114"
}
],
"gasLimit": "2500000"
}
}
{
"Code": 1,
"Error": [
{
"Code": "1",
"Message": [
{
"title": "",
"message": ""
}
]
}
],
"Payload": null
}
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. ThegasLimit
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 thegasLimit
themselves once the approval tx is mined.
Last updated