POST
/
quote
cURL
curl --request POST \
  --url https://api.relay.link/quote \
  --header 'Content-Type: application/json' \
  --data '{
  "user": "<string>",
  "recipient": "<string>",
  "originChainId": 123,
  "destinationChainId": 123,
  "originCurrency": "<string>",
  "destinationCurrency": "<string>",
  "amount": "<string>",
  "tradeType": "EXACT_INPUT",
  "txs": [
    {
      "to": "<string>",
      "value": "<string>",
      "data": "<string>"
    }
  ],
  "txsGasLimit": 123,
  "authorizationList": [
    {
      "chainId": 123,
      "address": "<string>",
      "nonce": 123,
      "yParity": 123,
      "r": "<string>",
      "s": "<string>"
    }
  ],
  "additionalData": {
    "userPublicKey": "<string>"
  },
  "referrer": "<string>",
  "referrerAddress": "<string>",
  "refundTo": "<string>",
  "refundOnOrigin": true,
  "topupGas": true,
  "topupGasAmount": "<string>",
  "useReceiver": true,
  "enableTrueExactOutput": false,
  "protocolVersion": "v1",
  "explicitDeposit": true,
  "useExternalLiquidity": true,
  "useFallbacks": true,
  "usePermit": true,
  "useDepositAddress": true,
  "slippageTolerance": "<string>",
  "latePaymentSlippageTolerance": "<string>",
  "appFees": [
    {
      "recipient": "<string>",
      "fee": "<string>"
    }
  ],
  "gasLimitForDepositSpecifiedTxs": 123,
  "forceSolverExecution": true,
  "subsidizeFees": true,
  "maxSubsidizationAmount": "<string>",
  "includedSwapSources": [
    "<string>"
  ],
  "excludedSwapSources": [
    "<string>"
  ],
  "includedOriginSwapSources": [
    "<string>"
  ],
  "includedDestinationSwapSources": [
    "<string>"
  ],
  "originGasOverhead": 123,
  "depositFeePayer": "<string>"
}'
{
  "steps": [
    {
      "id": "deposit",
      "action": "Confirm transaction in your wallet",
      "description": "Depositing funds to the relayer to execute the swap for USDC",
      "kind": "transaction",
      "requestId": "0x92b99e6e1ee1deeb9531b5ad7f87091b3d71254b3176de9e8b5f6c6d0bd3a331",
      "items": [
        {
          "status": "incomplete",
          "data": {
            "from": "0x0CccD55A5Ac261Ea29136831eeaA93bfE07f5Db6",
            "to": "0xf70da97812cb96acdf810712aa562db8dfa3dbef",
            "data": "0x00fad611",
            "value": "1000000000000000000",
            "maxFeePerGas": "12205661344",
            "maxPriorityFeePerGas": "2037863396",
            "chainId": 1
          },
          "check": {
            "endpoint": "/intents/status?requestId=0x92b99e6e1ee1deeb9531b5ad7f87091b3d71254b3176de9e8b5f6c6d0bd3a331",
            "method": "GET"
          }
        }
      ]
    }
  ],
  "fees": {
    "gas": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "relayer": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "relayerGas": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "relayerService": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "app": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "subsidized": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    }
  },
  "details": {
    "operation": "<string>",
    "sender": "<string>",
    "recipient": "<string>",
    "currencyIn": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "currencyOut": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "refundCurrency": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "currencyGasTopup": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
          "verified": false,
          "isNative": false
        }
      },
      "amount": "30754920",
      "amountFormatted": "30.75492",
      "amountUsd": "30.901612",
      "minimumAmount": "30454920"
    },
    "totalImpact": {
      "usd": "<string>",
      "percent": "<string>"
    },
    "swapImpact": {
      "usd": "<string>",
      "percent": "<string>"
    },
    "expandedPriceImpact": {
      "swap": {
        "usd": "<string>"
      },
      "execution": {
        "usd": "<string>"
      },
      "relay": {
        "usd": "<string>"
      },
      "app": {
        "usd": "<string>"
      }
    },
    "rate": "<string>",
    "slippageTolerance": {
      "origin": {
        "usd": "<string>",
        "value": "<string>",
        "percent": "<string>"
      },
      "destination": {
        "usd": "<string>",
        "value": "<string>",
        "percent": "<string>"
      }
    },
    "timeEstimate": 123,
    "userBalance": "<string>",
    "fallbackType": "<string>",
    "isFixedRate": true,
    "route": {
      "origin": {
        "inputCurrency": {
          "currency": {
            "chainId": 8453,
            "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "metadata": {
              "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
              "verified": false,
              "isNative": false
            }
          },
          "amount": "30754920",
          "amountFormatted": "30.75492",
          "amountUsd": "30.901612",
          "minimumAmount": "30454920"
        },
        "outputCurrency": {
          "currency": {
            "chainId": 8453,
            "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "metadata": {
              "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
              "verified": false,
              "isNative": false
            }
          },
          "amount": "30754920",
          "amountFormatted": "30.75492",
          "amountUsd": "30.901612",
          "minimumAmount": "30454920"
        },
        "router": "<string>",
        "includedSwapSources": [
          "<string>"
        ]
      },
      "destination": {
        "inputCurrency": {
          "currency": {
            "chainId": 8453,
            "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "metadata": {
              "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
              "verified": false,
              "isNative": false
            }
          },
          "amount": "30754920",
          "amountFormatted": "30.75492",
          "amountUsd": "30.901612",
          "minimumAmount": "30454920"
        },
        "outputCurrency": {
          "currency": {
            "chainId": 8453,
            "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "metadata": {
              "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
              "verified": false,
              "isNative": false
            }
          },
          "amount": "30754920",
          "amountFormatted": "30.75492",
          "amountUsd": "30.901612",
          "minimumAmount": "30454920"
        },
        "router": "<string>",
        "includedSwapSources": [
          "<string>"
        ]
      }
    }
  },
  "protocol": {
    "v2": {
      "orderId": "<string>",
      "paymentDetails": {
        "chainId": "<string>",
        "depository": "<string>",
        "currency": "<string>",
        "amount": "<string>"
      }
    }
  }
}

Body

application/json
user
string
required

Address that is depositing funds on the origin chain and submitting transactions or signatures

originChainId
number
required
destinationChainId
number
required
originCurrency
string
required
destinationCurrency
string
required
amount
string
required

Amount to swap as the base amount (can be switched to exact input/output using the dedicated flag), denoted in the smallest unit of the specified currency (e.g., wei for ETH)

tradeType
enum<string>
required

Whether to use the amount as the output or the input for the basis of the swap

Available options:
EXACT_INPUT,
EXACT_OUTPUT,
EXPECTED_OUTPUT
recipient
string

Address that is receiving the funds on the destination chain, if not specified then this will default to the user address

txs
object[]
txsGasLimit
number

Total gas limit for the destination chain call transactions

authorizationList
object[]

Authorization list for EIP-7702 transactions to be executed on destination chain

additionalData
object

Additional data needed for specific routes

referrer
string
referrerAddress
string
refundTo
string

Address to send the refund to in the case of failure, if not specified then the recipient address or user address is used

refundOnOrigin
boolean
deprecated

Always refund on the origin chain in case of any issues

topupGas
boolean

If set, the destination fill will include a gas topup to the recipient (only supported for EVM chains if the requested currency is not the gas currency on the destination chain)

topupGasAmount
string

The destination gas topup amount in USD decimal format, e.g 100000 = $1. topupGas is required to be enabled. Defaults to 2000000 ($2)

useReceiver
boolean
default:true

Enable this to route payments via a receiver contract. This contract will emit an event when receiving payments before forwarding to the solver. This is needed when depositing from a smart contract as the payment will be an internal transaction and detecting such a transaction requires obtaining the transaction traces.

enableTrueExactOutput
boolean
default:false

Enabling will send any swap surplus when doing exact output operations to the solver EOA, otherwise it will be swept to the recipient

protocolVersion
enum<string>

The protocol version to use for the quote (currently experimental, do not use in production)

Available options:
v1,
v2,
preferV2
explicitDeposit
boolean
default:true

Enable this to avoid direct transfers to the depository (only relevant for EVM and v2 protocol flow)

useExternalLiquidity
boolean

Enable this to use canonical+ bridging, trading speed for more liquidity

useFallbacks
boolean

Enable this for specific fallback routes

usePermit
boolean

Enable this to use permit (eip3009) when bridging, only works on supported currency such as usdc

useDepositAddress
boolean

Enable this to use a deposit address when bridging, in scenarios where calldata cannot be sent alongside the transaction. only works on native currency bridges.

slippageTolerance
string

Slippage tolerance for the swap, if not specified then the slippage tolerance is automatically calculated to avoid front-running. This value is in basis points (1/100th of a percent), e.g. 50 for 0.5% slippage

latePaymentSlippageTolerance
string

Slippage tolerance for destination gas in the event that the deposit occurs after the order deadline, and more gas is required for the solver to execute the destination transaction.

appFees
object[]
gasLimitForDepositSpecifiedTxs
number

If the request involves specifying transactions to be executed during the deposit transaction, an explicit gas limit must be set when requesting the quote

forceSolverExecution
boolean

Force executing swap requests via the solver (by default, same-chain swap requests are self-executed)

subsidizeFees
boolean

If the sponsor should pay for the fees associated with the request. Includes gas topup amounts.

maxSubsidizationAmount
string

The max subsidization amount in USD decimal format, e.g 100000 = $1. subsidizeFees must be enabled. This amount is the threshhold where if its surpassed the entire request will not be subsidized at all.

includedSwapSources
string[]

Swap sources to include for swap routing.

excludedSwapSources
string[]

Swap sources to exclude for swap routing.

includedOriginSwapSources
string[]

Swap sources to include for swap routing on origin.

includedDestinationSwapSources
string[]

Swap sources to include for swap routing on destination.

originGasOverhead
number

The gas overhead for the origin chain, this is used to calculate the gas fee for the origin chain when the solver is executing a gasless transaction on the origin chain

depositFeePayer
string

The payer to be set for deposit transactions on solana. This account must have enough for fees and rent.

Response

Default Response

steps
object[]

An array of steps detailing what needs to be done to bridge, steps includes multiple items of the same kind (signature, transaction, etc)

Example:
[
{
"id": "deposit",
"action": "Confirm transaction in your wallet",
"description": "Depositing funds to the relayer to execute the swap for USDC",
"kind": "transaction",
"requestId": "0x92b99e6e1ee1deeb9531b5ad7f87091b3d71254b3176de9e8b5f6c6d0bd3a331",
"items": [
{
"status": "incomplete",
"data": {
"from": "0x0CccD55A5Ac261Ea29136831eeaA93bfE07f5Db6",
"to": "0xf70da97812cb96acdf810712aa562db8dfa3dbef",
"data": "0x00fad611",
"value": "1000000000000000000",
"maxFeePerGas": "12205661344",
"maxPriorityFeePerGas": "2037863396",
"chainId": 1
},
"check": {
"endpoint": "/intents/status?requestId=0x92b99e6e1ee1deeb9531b5ad7f87091b3d71254b3176de9e8b5f6c6d0bd3a331",
"method": "GET"
}
}
]
}
]
fees
object
details
object

A summary of the swap and what the user should expect to happen given an input

protocol
object

Protocol information for the quote