Ring Exchange API Reference

Get Quote

POST /protocol/get-protocol-quotes

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

Base URL

https://api.pod.routerintents.com

Body

{
    "ReceiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
    "SourceTokens": [
        {
            "chainId": "534352",
            "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
            "name": "USDC",
            "symbol": "USDC",
            "decimals": 6
        }
    ],
    "DestinationTokens": [
        {
            "chainId": "81457",
            "address": "0x4300000000000000000000000000000000000003",
            "name": "USDB",
            "symbol": "USDB",
            "decimals": 18
        },
        {
            "chainId": "81457",
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 18
        }
    ],
    "Amount": [
        "12000000"
    ],
    "SourceChainId": 534352,
    "Protocol": [
        {
            "protocolId": "ring",
            "chainId": "81457",
            "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: 534352 for Scroll

Protocol

object (required)

Intent adapter information for Ring Exchange

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": "ring",
    "chainId": "81457",
    "action": "deposit",
    "poolId": ""
}

Response

200: Success
{
    "Code": 0,
    "Errors": [],
    "PayLoad": {
        "appId": "0",
        "quotationType": "BatchTransaction",
        "feeParams": [
            {
                "fee": "6000",
                "recipient": "0x00EB64b501613F8Cf8Ef3Ac4F82Fc63a50343fee",
                "decimals": 6,
                "symbol": "USDC",
                "tokenAddress": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                "chainId": 534352,
                "name": "USDC",
                "adapter": "batch-handler",
                "appId": "0",
                "feeArray": []
            }
        ],
        "slippageTolerance": 2,
        "sourceTokens": [
            {
                "chainId": "534352",
                "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                "name": "USDC",
                "symbol": "USDC",
                "decimals": 6
            }
        ],
        "amount": [
            "12000000"
        ],
        "sourceChainId": 534352,
        "destinationChainId": 81457,
        "adapters": [
            {
                "adapterId": "nitro_bridge",
                "adapterType": "bridge",
                "sourceChainId": 534352,
                "destChainId": "81457",
                "adapterOptions": {
                    "srcToken": {
                        "chainId": "534352",
                        "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                        "name": "USDC",
                        "symbol": "USDC",
                        "decimals": 6
                    },
                    "amountIn": "11994000",
                    "amountOut": "11666253931001313280",
                    "destToken": {
                        "chainId": "81457",
                        "address": "0x4300000000000000000000000000000000000003",
                        "name": "USDB",
                        "symbol": "USDB",
                        "decimals": 18
                    },
                    "receiverAddress": "0xf74bd5c3EDEB75DC335e1d28357Ff0fA5f2e80fB",
                    "data": {
                        "actionType": 1,
                        "refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                        "partnerId": 237,
                        "isSingleEntry": false,
                        "tokens": [
                            "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                            "0x5300000000000000000000000000000000000004"
                        ],
                        "bridgeFee": {
                            "amount": "50372997149866",
                            "decimals": 18,
                            "symbol": "WETH",
                            "address": "0x5300000000000000000000000000000000000004"
                        },
                        "isMainnet": true,
                        "quotationParams": {
                            "fromTokenAddress": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                            "toTokenAddress": "0x4300000000000000000000000000000000000003",
                            "amount": "11994000",
                            "fromTokenChainId": 534352,
                            "toTokenChainId": "81457",
                            "partnerId": 237,
                            "additionalGasLimit": 260000,
                            "slippageTolerance": 2
                        },
                        "forwarderQuotation": {
                            "flowType": "trustless",
                            "isTransfer": "false",
                            "isWrappedToken": false,
                            "allowanceTo": "0x5546dA2bCdCFF39b187723434cDE10D4eE99C566",
                            "bridgeFee": {
                                "amount": "50372997149866",
                                "decimals": 18,
                                "symbol": "WETH",
                                "address": "0x5300000000000000000000000000000000000004"
                            },
                            "fuelTransfer": null,
                            "fromTokenAddress": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                            "toTokenAddress": "0x4300000000000000000000000000000000000003",
                            "source": {
                                "chainId": "534352",
                                "chainType": "evm",
                                "asset": {
                                    "decimals": 6,
                                    "symbol": "USDC",
                                    "name": "USDC",
                                    "chainId": "534352",
                                    "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                                    "resourceID": "usdc-circle",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false,
                                    "tokenInstance": {
                                        "decimals": 6,
                                        "symbol": "USDC",
                                        "name": "USDC",
                                        "chainId": 534352,
                                        "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4"
                                    }
                                },
                                "stableReserveAsset": {
                                    "decimals": 18,
                                    "symbol": "WETH",
                                    "name": "WETH",
                                    "chainId": "534352",
                                    "address": "0x5300000000000000000000000000000000000004",
                                    "resourceID": "native-eth",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false
                                },
                                "tokenAmount": "11994000",
                                "stableReserveAmount": "4814822535481332",
                                "path": [
                                    "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                                    "0x5300000000000000000000000000000000000004"
                                ],
                                "flags": [
                                    "4002"
                                ],
                                "priceImpact": "0.00",
                                "tokenPath": "USDC->WETH",
                                "dataTx": [
                                    "0x90411a32000000000000000000000000170100a288dc3d7e83fea20441f98166b15b6df0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000006efdbff2a14a7c8e15944d1f4a48f9f95f663a40000000000000000000000005300000000000000000000000000000000000004000000000000000000000000170100a288dc3d7e83fea20441f98166b15b6df00000000000000000000000005546da2bcdcff39b187723434cde10d4ee99c5660000000000000000000000000000000000000000000000000000000000b7039000000000000000000000000000000000000000000000000000111b0e3ae247f400000000000000000000000000000000000000000000000000114749d93750700000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001045761880400000000000000000000000096cfa2a369ec67a93c324a35e693fbeea11c059400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000b70390000000000000000000000000170100a288dc3d7e83fea20441f98166b15b6df000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000003f8c7d3063579bdb0b90997e18a770eae32e1ebb0806efdbff2a14a7c8e15944d1f4a48f9f95f663a40001f453000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e850000000000000000000000005300000000000000000000000000000000000004000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a000000000000000000000000000000000000000000000000000114749d937507000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000530000000000000000000000000000000000000400000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f9900000000000000000000000053000000000000000000000000000000000000040000000000000000000000005546da2bcdcff39b187723434cde10d4ee99c56600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                                ]
                            },
                            "destination": {
                                "chainId": "81457",
                                "chainType": "evm",
                                "asset": {
                                    "decimals": 18,
                                    "symbol": "USDB",
                                    "name": "USDB",
                                    "chainId": "81457",
                                    "address": "0x4300000000000000000000000000000000000003",
                                    "resourceID": "",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false,
                                    "tokenInstance": {
                                        "decimals": 18,
                                        "symbol": "USDB",
                                        "name": "USDB",
                                        "chainId": 81457,
                                        "address": "0x4300000000000000000000000000000000000003"
                                    }
                                },
                                "stableReserveAsset": {
                                    "decimals": 18,
                                    "symbol": "WETH",
                                    "name": "WETH",
                                    "chainId": "81457",
                                    "address": "0x4300000000000000000000000000000000000004",
                                    "resourceID": "native-eth",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false
                                },
                                "tokenAmount": "11784094879799306340",
                                "stableReserveAmount": "4764449538331466",
                                "priceImpact": "0.00",
                                "tokenPath": "WETH->USDB",
                                "dataTx": [
                                    "0x90411a32000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000043000000000000000000000000000000000000040000000000000000000000004300000000000000000000000000000000000003000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e600000000000000000000000001b4ce0d48ce91eb6bcaf5db33870c65d641b8940000000000000000000000000000000000000000000000000010ed3dda48534a000000000000000000000000000000000000000000000000a1e6dc23c8d677fc000000000000000000000000000000000000000000000000a38983dbbdefe8640000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000001d74611f3ef04e7252f7651526711a937aa1f75e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010ed3dda48534a000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e4300000000000000000000000000000000000004000000430000000000000000000000000000000000000300002900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e850000000000000000000000004300000000000000000000000000000000000003000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a0000000000000000000000000000000000000000000000000a38983dbbdefe86400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000430000000000000000000000000000000000000300000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000430000000000000000000000000000000000000300000000000000000000000001b4ce0d48ce91eb6bcaf5db33870c65d641b89400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                                ],
                                "path": [
                                    "0x4300000000000000000000000000000000000004",
                                    "0x4300000000000000000000000000000000000003"
                                ],
                                "flags": [
                                    "4002"
                                ]
                            },
                            "partnerId": "237",
                            "slippageTolerance": "2",
                            "estimatedTime": 40
                        },
                        "destinationAmount": "11784094879799306340",
                        "destinationAmountPromised": "11666253931001313280"
                    }
                },
                "trnxType": 1,
                "adapters": [
                    {
                        "adapterId": "dex_swap",
                        "adapterType": "swap",
                        "sourceChainId": "81457",
                        "destChainId": "81457",
                        "adapterOptions": {
                            "srcToken": {
                                "chainId": "81457",
                                "address": "0x4300000000000000000000000000000000000003",
                                "name": "USDB",
                                "symbol": "USDB",
                                "decimals": 18
                            },
                            "amountIn": "5803961330673153024",
                            "amountOut": "2346479375529448",
                            "destToken": {
                                "chainId": "81457",
                                "address": "0x4300000000000000000000000000000000000004",
                                "name": "WETH",
                                "symbol": "WETH",
                                "decimals": 18,
                                "resourceID": "native-eth",
                                "isMintable": false,
                                "isWrappedAsset": false
                            },
                            "receiverAddress": "0xf74bd5c3EDEB75DC335e1d28357Ff0fA5f2e80fB",
                            "data": {
                                "tokens": [
                                    "0x4300000000000000000000000000000000000003",
                                    "0x4300000000000000000000000000000000000004"
                                ],
                                "flags": [
                                    "4002"
                                ],
                                "dataTx": [
                                    "0x90411a32000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000043000000000000000000000000000000000000030000000000000000000000004300000000000000000000000000000000000004000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e600000000000000000000000001b4ce0d48ce91eb6bcaf5db33870c65d641b894000000000000000000000000000000000000000000000000508bd0145ce0740000000000000000000000000000000000000000000000000000082b6da84218ab0000000000000000000000000000000000000000000000000008561c4da6b5e80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb000000000000000000000000da5aaeb22ed5b8aa76347ec57424ca0d109efb2a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000508bd0145ce07400000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e4300000000000000000000000000000000000003000000430000000000000000000000000000000000000400002d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e850000000000000000000000004300000000000000000000000000000000000004000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a00000000000000000000000000000000000000000000000000008561c4da6b5e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000430000000000000000000000000000000000000400000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000430000000000000000000000000000000000000400000000000000000000000001b4ce0d48ce91eb6bcaf5db33870c65d641b89400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                                ],
                                "sourceStableReserveAmount": "2346479375529448",
                                "sourceStableReserveToken": {
                                    "decimals": 18,
                                    "symbol": "WETH",
                                    "name": "WETH",
                                    "chainId": "81457",
                                    "address": "0x4300000000000000000000000000000000000004",
                                    "resourceID": "native-eth",
                                    "isMintable": false,
                                    "isWrappedAsset": false,
                                    "isReserveAsset": false,
                                    "tokenInstance": {
                                        "decimals": 18,
                                        "symbol": "WETH",
                                        "name": "WETH",
                                        "chainId": 81457,
                                        "address": "0x4300000000000000000000000000000000000004"
                                    }
                                },
                                "slippageTolerance": 2,
                                "forwarderQuotation": {
                                    "flowType": "none",
                                    "isTransfer": "false",
                                    "isWrappedToken": false,
                                    "allowanceTo": "0x01B4CE0d48Ce91eB6bcaf5dB33870C65d641b894",
                                    "bridgeFee": {},
                                    "fuelTransfer": null,
                                    "fromTokenAddress": "0x4300000000000000000000000000000000000003",
                                    "toTokenAddress": "0x4300000000000000000000000000000000000004",
                                    "source": {
                                        "chainId": "81457",
                                        "chainType": "evm",
                                        "asset": {
                                            "decimals": 18,
                                            "symbol": "USDB",
                                            "name": "USDB",
                                            "chainId": "81457",
                                            "address": "0x4300000000000000000000000000000000000003",
                                            "resourceID": "",
                                            "isMintable": false,
                                            "isWrappedAsset": false,
                                            "isReserveAsset": false,
                                            "tokenInstance": {
                                                "decimals": 18,
                                                "symbol": "USDB",
                                                "name": "USDB",
                                                "chainId": 81457,
                                                "address": "0x4300000000000000000000000000000000000003"
                                            }
                                        },
                                        "stableReserveAsset": null,
                                        "tokenAmount": "5803961330673153024",
                                        "stableReserveAmount": "2346479375529448",
                                        "path": [
                                            "0x4300000000000000000000000000000000000003",
                                            "0x4300000000000000000000000000000000000004"
                                        ],
                                        "flags": [
                                            "4002"
                                        ],
                                        "priceImpact": "0.00",
                                        "tokenPath": "undefined->WETH",
                                        "dataTx": [
                                            "0x90411a32000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000043000000000000000000000000000000000000030000000000000000000000004300000000000000000000000000000000000004000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e600000000000000000000000001b4ce0d48ce91eb6bcaf5db33870c65d641b894000000000000000000000000000000000000000000000000508bd0145ce0740000000000000000000000000000000000000000000000000000082b6da84218ab0000000000000000000000000000000000000000000000000008561c4da6b5e80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d2137a6d0ef438a7c2bb38eeef364500271658be00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb000000000000000000000000da5aaeb22ed5b8aa76347ec57424ca0d109efb2a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000508bd0145ce07400000000000000000000000000703855c7be44426f4c1c70976979f1ef3a6e58e600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e4300000000000000000000000000000000000003000000430000000000000000000000000000000000000400002d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e850000000000000000000000004300000000000000000000000000000000000004000000000000000000000000353c1f0bc78fbbc245b3c93ef77b1dcc5b77d2a00000000000000000000000000000000000000000000000000008561c4da6b5e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f865422000000000000000000000000430000000000000000000000000000000000000400000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000430000000000000000000000000000000000000400000000000000000000000001b4ce0d48ce91eb6bcaf5db33870c65d641b89400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                                        ]
                                    },
                                    "destination": {
                                        "chainId": "81457",
                                        "asset": {
                                            "decimals": 18,
                                            "symbol": "WETH",
                                            "name": "WETH",
                                            "chainId": "81457",
                                            "address": "0x4300000000000000000000000000000000000004",
                                            "resourceID": "native-eth",
                                            "isMintable": false,
                                            "isWrappedAsset": false,
                                            "isReserveAsset": false,
                                            "tokenInstance": {
                                                "decimals": 18,
                                                "symbol": "WETH",
                                                "name": "WETH",
                                                "chainId": 81457,
                                                "address": "0x4300000000000000000000000000000000000004"
                                            }
                                        },
                                        "tokenAmount": "2346479375529448"
                                    },
                                    "partnerId": "237",
                                    "sameChainSwapFee": "0",
                                    "slippageTolerance": "2",
                                    "estimatedTime": 40
                                },
                                "partnerId": 237,
                                "isSingleEntry": false
                            }
                        },
                        "trnxType": 1,
                        "adapters": []
                    },
                    {
                        "adapterId": "ring_deposit",
                        "adapterType": "amm",
                        "sourceChainId": "81457",
                        "destChainId": "81457",
                        "adapterOptions": {
                            "receiverAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                            "data": {
                                "refundAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                                "tokenA": {
                                    "chainId": "81457",
                                    "address": "0x4300000000000000000000000000000000000003",
                                    "name": "USDB",
                                    "symbol": "USDB",
                                    "decimals": 18
                                },
                                "tokenB": {
                                    "chainId": "81457",
                                    "address": "0x4300000000000000000000000000000000000004",
                                    "name": "WETH",
                                    "symbol": "WETH",
                                    "decimals": 18,
                                    "resourceID": "native-eth",
                                    "isMintable": false,
                                    "isWrappedAsset": false
                                },
                                "amountACal": "5803961330673153024",
                                "amountBCal": "5803961330673153024",
                                "amountADesired": "5803961330673153024",
                                "amountBDesired": "2346479375529448",
                                "amountAMin": "5803961330673153",
                                "amountBMin": "2346479375529",
                                "to": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
                                "deadline": 1730721625328,
                                "poolAddress": "0x9BE8a40C9cf00fe33fd84EAeDaA5C4fe3f04CbC3"
                            }
                        },
                        "adapters": []
                    }
                ],
                "fee": {
                    "fee": "50372997149866",
                    "recipient": "",
                    "decimals": 18,
                    "symbol": "WETH",
                    "tokenAddress": "0x5300000000000000000000000000000000000004",
                    "chainId": 534352,
                    "name": "WETH",
                    "adapter": "nitro_bridge",
                    "appId": "0",
                    "feeArray": []
                }
            }
        ],
        "quote": [
            {
                "amountSent": 11994000,
                "amountReceived": "11666253931001313280",
                "amountReceivedInEther": "11.666254",
                "exchangeRate": "",
                "estimatedTime": 40,
                "slippageTolerance": "2",
                "srcToken": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
                "destToken": "0x4300000000000000000000000000000000000003",
                "adapterId": "nitro_bridge",
                "bridgeFee": {
                    "amount": "50372997149866",
                    "decimals": 18,
                    "symbol": "WETH",
                    "address": "0x5300000000000000000000000000000000000004"
                }
            },
            {
                "amountSent": "5803961330673153024",
                "amountReceived": "2346479375529448",
                "amountReceivedInEther": "0.002346",
                "exchangeRate": 1,
                "estimatedTime": 40,
                "slippageTolerance": "2",
                "srcToken": "0x4300000000000000000000000000000000000003",
                "destToken": "0x4300000000000000000000000000000000000004",
                "adapterId": "dex_swap"
            },
            {
                "amountSent": 0,
                "amountReceived": 0,
                "amountReceivedInEther": 0,
                "srcToken": "",
                "destToken": "",
                "adapterId": "ring_deposit",
                "estimatedTime": 0
            }
        ],
        "clientAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
        "senderAddress": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
        "estimatedTime": 80,
        "trnxTypes": [
            1
        ]
    }
}
400: Bad Request
{
  "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-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": "534352",
            "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
            "name": "USDC",
            "symbol": "USDC",
            "decimals": 6
        }
    ],
    "DestinationTokens": [
        {
            "chainId": "81457",
            "address": "0x4300000000000000000000000000000000000003",
            "name": "USDB",
            "symbol": "USDB",
            "decimals": 18
        },
        {
            "chainId": "81457",
            "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 18
        }
    ],
    "Amount": [
        "12000000"
    ],
    "SourceChainId": 534352,
    "Protocol": [
        {
            "protocolId": "ring",
            "chainId": "81457",
            "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": "d7632e6a-005f-4af0-929d-5de7eba49274",
        "gasPrice": "414855",
        "calldata": "0xabcd",
        "to": "0xeA8fd31012991e1518Fe47f7BC7849859385Cf70",
        "from": "0x2B4fAD70FC7E6579f19163DeEBbc5846bead25C8",
        "value": "5000000000000000",
        "prioritySteps": [],
        "gasLimit": "2500000"
    }
}

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