curl --request GET \
--url https://api.chainrails.io/api/v1/ramp/quotes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chainrails.io/api/v1/ramp/quotes"
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/ramp/quotes', 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/ramp/quotes",
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/ramp/quotes"
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/ramp/quotes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainrails.io/api/v1/ramp/quotes")
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_bodyGet aggregated ramp quotes
Returns on-ramp or off-ramp quotes from all eligible providers, sorted by cheapest total cost.
curl --request GET \
--url https://api.chainrails.io/api/v1/ramp/quotes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chainrails.io/api/v1/ramp/quotes"
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/ramp/quotes', 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/ramp/quotes",
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/ramp/quotes"
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/ramp/quotes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainrails.io/api/v1/ramp/quotes")
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_bodyAuthorizations
Enter your Chainrails API key as a Bearer token
Query Parameters
Type of quote to get
on-ramp, off-ramp ISO 4217 fiat currency code
"NGN"
Amount of crypto the user wants to receive (on-ramp) or sell (off-ramp). For off-ramp this is the amount of the selected source token.
10
Destination blockchain where user wants funds (required for on-ramp)
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 "BASE_MAINNET"
Source blockchain where user will send crypto from (required for off-ramp)
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 "BASE_MAINNET"
Token symbol for cryptoAmount (defaults to USDC)
USDC, USDT, DAI, BUSD, EURC, ETH, WETH, STRK, BNB, LORDS, USDS, USDG, USDT0, WBTC, LINK, SOL, EKUBO, AAVE, UNI, CURVE, cbBTC, VIRTUAL, stETH, wstETH, SKY, AUSD, WMON, LVMON, OP, WLD, ARB, sAVAX, WAVAX, anyBTC, WBNB, TRON, AVAX, POL, MON ISO 3166-1 alpha-2 country code of the user. Required for multi-country currencies (e.g., XOF — pass "BJ" for Benin, "SN" for Senegal). Falls back to the currency's default country if omitted.
"NG"
If true, only return quotes with direct transfer channels (no widget/redirect)
false
User's email. When supplied, recommendation can prefer providers where the user is already KYC-cleared.
Response
Aggregated ramp quotes
Was this page helpful?

