Skip to main content
Before initiating a cross-chain transfer or creating an intent, you can request a quote from Chainrails. The quote engine provides comprehensive information about 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 provides comprehensive cross-chain transfer quotes from a single bridge, multiple bridges or even multiple source chains. You can retrieve:
Some quote endpoints take in an optional amountSymbol parameter which can be used to specify the denomination of the amount you want to send. For quotes in USD, you can either set amountSymbol to USDC (or leave it empty).You can quote in a different denomination than the token you want to send. For example, you can set amountSymbol to USDC, while sending ETH as tokenIn

A single quote for a specific 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.
For most cases, you would want to use the multi-source quoting as it shows the user all the best quotes to choose from.

The Routing Engine

The Routing Engine provides extensive details about supported bridges, their available routes, and the optimal route for a given transfer intent. For most use cases, the quote engine is sufficient but if you want more fine grained control over bridge selection, you can use the routing engine directly. You can consult the API reference for all available routing endpoints.

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