Get quotes from all source chains to destination
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."
}Quotes
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
GET
/
quotes
/
multi-source
Get quotes from all source chains to destination
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."
}Query Parameters
Destination blockchain where Alice wants to send money
Available options:
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 Response
Multi-source quotes retrieved successfully
Was this page helpful?

