Skip to main content
Retrieves a cross-chain transfer quote from a specific bridge protocol. Parameters:
  • tokenIn (required): Input token address
  • tokenOut (required): Output token address
  • sourceChain (required): Source blockchain
  • destinationChain (required): Destination blockchain
  • amount (required): Amount in token units
  • amountSymbol (optional): The denomination of the amount (e.g., USDC, DAI, ETH).
  • bridge (required): Bridge to use (e.g ACROSS, CCTP, GATEWAY, RHINOFI)
  • recipient (optional): Recipient address
The amountSymbol parameter is used to specify the denomination of the amount you want to send. For quotes in USD, you need to set amountSymbol to USDC (or leave 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
import { crapi, Chainrails } from "@chainrails/sdk"

Chainrails.config({
  api_key: "your_api_key_here"
})

const quote = await crapi.quotes.getFromSpecificBridge({
  tokenIn: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  tokenOut: "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
  sourceChain: "BASE_MAINNET",
  destinationChain: "ARBITRUM_MAINNET",
  amount: "10000000",
  bridge: "ACROSS",
  recipient: "0x742d35Cc6635C0532925a3b8D62A7fe7B58123D1"
})

console.log("Quote:", quote)