curl --request GET \
--url https://api.chainrails.io/api/v1/quotes/multi-source \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chainrails.io/api/v1/quotes/multi-source"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chainrails.io/api/v1/quotes/multi-source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chainrails.io/api/v1/quotes/multi-source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chainrails.io/api/v1/quotes/multi-source"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chainrails.io/api/v1/quotes/multi-source")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainrails.io/api/v1/quotes/multi-source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"destinationChain": "ARBITRUM_TESTNET",
"quotes": [
{
"sourceChain": "BASE_TESTNET",
"destinationChain": "ARBITRUM_TESTNET",
"totalFee": "18000",
"totalFeeFormatted": "0.018",
"bridge": "CCTP",
"paymentOptions": [
{
"token": "USDC",
"tokenAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
"depositAmount": "1518000",
"depositAmountFormatted": "1.518",
"slippage": 0
}
]
}
],
"cheapestOption": {
"sourceChain": "ARBITRUM_TESTNET",
"destinationChain": "ARBITRUM_TESTNET",
"totalFee": "10000",
"totalFeeFormatted": "0.01",
"bridge": null,
"paymentOptions": [
{
"token": "USDC",
"tokenAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
"depositAmount": "1010000",
"depositAmountFormatted": "1.01",
"slippage": 0
}
]
}
}{
"statusCode": 400,
"message": "Amount must be a valid positive number"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 500,
"message": "Failed to retrieve multi-source quotes. Please try again later."
}Get quotes from all source chains to destination
Shows Alice all her options to send money to a specific destination chain, including same-chain transfers
curl --request GET \
--url https://api.chainrails.io/api/v1/quotes/multi-source \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chainrails.io/api/v1/quotes/multi-source"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chainrails.io/api/v1/quotes/multi-source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chainrails.io/api/v1/quotes/multi-source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chainrails.io/api/v1/quotes/multi-source"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chainrails.io/api/v1/quotes/multi-source")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainrails.io/api/v1/quotes/multi-source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"destinationChain": "ARBITRUM_TESTNET",
"quotes": [
{
"sourceChain": "BASE_TESTNET",
"destinationChain": "ARBITRUM_TESTNET",
"totalFee": "18000",
"totalFeeFormatted": "0.018",
"bridge": "CCTP",
"paymentOptions": [
{
"token": "USDC",
"tokenAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
"depositAmount": "1518000",
"depositAmountFormatted": "1.518",
"slippage": 0
}
]
}
],
"cheapestOption": {
"sourceChain": "ARBITRUM_TESTNET",
"destinationChain": "ARBITRUM_TESTNET",
"totalFee": "10000",
"totalFeeFormatted": "0.01",
"bridge": null,
"paymentOptions": [
{
"token": "USDC",
"tokenAddress": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
"depositAmount": "1010000",
"depositAmountFormatted": "1.01",
"slippage": 0
}
]
}
}{
"statusCode": 400,
"message": "Amount must be a valid positive number"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 500,
"message": "Failed to retrieve multi-source quotes. Please try again later."
}Authorizations
Enter your Chainrails API key as a Bearer token
Query Parameters
Destination blockchain where Alice wants to send money
ARBITRUM_MAINNET, ARBITRUM_TESTNET, AVALANCHE_MAINNET, AVALANCHE_TESTNET, BASE_MAINNET, BASE_TESTNET, STARKNET_MAINNET, STARKNET_TESTNET, BSC_MAINNET, ETHEREUM_MAINNET, ETHEREUM_TESTNET, OPTIMISM_MAINNET, OPTIMISM_TESTNET, MONAD_MAINNET, MONAD_TESTNET, POLYGON_MAINNET, HYPEREVM_MAINNET, LISK_MAINNET, SOLANA_MAINNET, SOLANA_TESTNET, TRON_MAINNET Amount in human readable format (supports decimals, e.g., "1.5", "100", "0.001")
"1.5"
Output token address
"0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4"
Optional recipient address
"0x742d35Cc6635C0532925a3b8D62A7fe7B58123D1"
Comma-separated chains to exclude from results
"BASE_TESTNET,OPTIMISM"
Response
Multi-source quotes retrieved successfully
Target destination chain
"ARBITRUM_TESTNET"
Quotes from all possible source chains (same-chain listed first, then sorted by cost)
Show child attributes
Show child attributes
The cheapest option among all source chains (based on totalFee)
Show child attributes
Show child attributes
Was this page helpful?

