Find optimal cross-chain transfer route
Changed onAnalyzes available bridges and returns the optimal route with best pricing
Request
- Base URLhttps://api.chainrails.io/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Input token contract address
Output token contract address
Source blockchain
Destination blockchain
Transfer amount in token units (wei for ETH)
Recipient address for the cross-chain transfer (required for some bridges like RhinoFi)
Token symbol for amount denomination (e.g., USDC, USDT, ETH)
Response
Optimal route found successfully
Example response
{
"sourceChain": "BASE_TESTNET",
"destinationChain": "ARBITRUM_TESTNET",
"tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tokenOut": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4",
"originalAmount": "10000000",
"totalFees": "18000",
"bridgeToUse": "CCTP",
"bridgeAddress": "0xa1c943058a631D5506eb7d96036eAbF6968e2338",
"bridgeExtraData": "0x00000000000000000000000000000000000000000000000000000000000001f4",
"supportedBridges": [
"ACROSS",
"CCTP"
],
"bridgeFeeDetails": {
"maxFee": "8000"
}
}Changes
- info
added the new enum value
SOLANA_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
SOLANA_MAINNETto thequeryrequest parametersourceChain - info
added the new enum value
SOLANA_TESTNETto thequeryrequest parameterdestinationChain - info
added the new enum value
SOLANA_TESTNETto thequeryrequest parametersourceChain - info
added the new enum value
TRON_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
TRON_MAINNETto thequeryrequest parametersourceChain
- info
- breaking
added the new required
queryrequest parameteramountSymbol - info
added the new enum value
HYPEREVM_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
HYPEREVM_MAINNETto thequeryrequest parametersourceChain - info
added the new enum value
LISK_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
LISK_MAINNETto thequeryrequest parametersourceChain - info
added the new enum value
MONAD_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
MONAD_MAINNETto thequeryrequest parametersourceChain - info
added the new enum value
MONAD_TESTNETto thequeryrequest parameterdestinationChain - info
added the new enum value
MONAD_TESTNETto thequeryrequest parametersourceChain - info
added the new enum value
OPTIMISM_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
OPTIMISM_MAINNETto thequeryrequest parametersourceChain - info
added the new enum value
OPTIMISM_TESTNETto thequeryrequest parameterdestinationChain - info
added the new enum value
OPTIMISM_TESTNETto thequeryrequest parametersourceChain - info
added the new enum value
POLYGON_MAINNETto thequeryrequest parameterdestinationChain - info
added the new enum value
POLYGON_MAINNETto thequeryrequest parametersourceChain
- breaking