Skip to main content
Before initiating a cross-chain transfer or creating an intent, you can request a quote from Chainrails. The quote and routing engine work together to tell you how a transaction will be executed — including the route, estimated fees, and destination amount. This allows your app to show users exactly what to expect before they fund the transaction.

Requesting Quotes

The quote engine primarily provides comprehensive cross-chain transfer quotes from a single bridge, multiple bridges or even multiple soure chains. You can retrieve:

A single quote for a secific route

curl --request GET \
  --url "https://api.chainrails.io/api/v1/quotes/single?tokenIn=0x036CbD53842c5426634e7929541eC2318f3dCF7e&tokenOut=0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d&sourceChain=BASE_TESTNET&destinationChain=ARBITRUM_TESTNET&amount=1000000&bridge=CCTP" \
  --header "Authorization: Bearer YOUR_API_KEY"

Or a multi-source quote for a given destination chain

Useful for when you want to show users all source options and their respective fees to send funds to a specific destination chain.
curl --request GET \
  --url "https://api.chainrails.io/api/v1/quotes/multi-source?destinationChain=ARBITRUM_TESTNET&amount=1.5&tokenOut=0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" \
  --header "Authorization: Bearer YOUR_API_KEY"
You can also get quotes from multiple bridges for a specific route, filter for best quotes and more. See the API reference for all available quote endpoints.

Quote Parameters Reference

ParameterTypeRequiredDescriptionExample
tokenInstring✅ Yes (for /quotes/single)Address of the input token on the source chain. This is the token the user will send.0x036CbD53842c5426634e7929541eC2318f3dCF7e
tokenOutstring✅ YesAddress of the output token on the destination chain.0x06ef8BFf21a47c8E15944D1f4A68F9F95f66A34
sourceChainstring✅ Yes (for /quotes/single)The blockchain where the user is sending funds from. Must be one of the supported chain identifiers.BASE_TESTNET
destinationChainstring✅ YesThe blockchain where the funds should arrive. Must be one of the supported chain identifiers.ARBITRUM_TESTNET
amountstring✅ YesAmount to transfer, in token units. Supports decimals."1.5"
bridgestring✅ Yes (for /quotes/single)The specific bridge protocol to use for the quote.ACROSS
recipientstring❌ OptionalAddress of the final recipient of the transfer.0xb79541Be080a59fdcE6C0b43219ba56c725eC65e

For most cases, you would want to use the multi-source quoting as it shows the user all the best quotes to choose from.