curl -X POST https://api.relayer.fi/v1/payout/onramp/quote \
-H "Authorization: ApiKey $RELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": { "currency": "mxn", "country": "MX" },
"to": { "currency": "usdc", "chain": "base" },
"amount": "10000.00"
}'const response = await fetch("https://api.relayer.fi/v1/payout/onramp/quote", {
method: "POST",
headers: {
Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
from: { currency: "mxn", country: "MX" },
to: { currency: "usdc", chain: "base" },
amount: "10000.00",
}),
});import requests
url = "https://testnet.relayer.fi/v1/payout/onramp/quote"
payload = {
"source_currency": "mxn",
"destination_currency": "usdc",
"source_amount": "1000.00",
"destination_amount": "50.00"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_currency: 'mxn',
destination_currency: 'usdc',
source_amount: '1000.00',
destination_amount: '50.00'
})
};
fetch('https://testnet.relayer.fi/v1/payout/onramp/quote', 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://testnet.relayer.fi/v1/payout/onramp/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_currency' => 'mxn',
'destination_currency' => 'usdc',
'source_amount' => '1000.00',
'destination_amount' => '50.00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.relayer.fi/v1/payout/onramp/quote"
payload := strings.NewReader("{\n \"source_currency\": \"mxn\",\n \"destination_currency\": \"usdc\",\n \"source_amount\": \"1000.00\",\n \"destination_amount\": \"50.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://testnet.relayer.fi/v1/payout/onramp/quote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source_currency\": \"mxn\",\n \"destination_currency\": \"usdc\",\n \"source_amount\": \"1000.00\",\n \"destination_amount\": \"50.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/payout/onramp/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_currency\": \"mxn\",\n \"destination_currency\": \"usdc\",\n \"source_amount\": \"1000.00\",\n \"destination_amount\": \"50.00\"\n}"
response = http.request(request)
puts response.read_body{
"source_amount": "1000.00",
"source_currency": "mxn",
"destination_amount": "49.45",
"destination_currency": "usdc",
"midmarket_rate": "0.0500",
"sell_rate": "0.0497",
"display_rate": "1 USD ≈ 20.10 MXN",
"network_fee_percent": 0.6,
"network_fee_amount": "0.30",
"service_fee_percent": 0.5,
"service_fee_amount": "0.25",
"total_fee_percent": 1.1,
"total_fee_amount": "0.55",
"developer_fee_percent": 0.5,
"developer_fee_amount": "0.25",
"estimated_arrival": "≈ 2 minutes after deposit"
}Get an on-ramp quote (fiat → stablecoin)
Returns the live exchange rate from Bridge plus the developer_fee_percent applied to the conversion. Bridge’s 0.75% commercial fee is BAKED INTO sell_rate (per Bridge docs); this endpoint surfaces the developer fee separately so it can be displayed transparently to the end user. Public — no auth required.
curl -X POST https://api.relayer.fi/v1/payout/onramp/quote \
-H "Authorization: ApiKey $RELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": { "currency": "mxn", "country": "MX" },
"to": { "currency": "usdc", "chain": "base" },
"amount": "10000.00"
}'const response = await fetch("https://api.relayer.fi/v1/payout/onramp/quote", {
method: "POST",
headers: {
Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
from: { currency: "mxn", country: "MX" },
to: { currency: "usdc", chain: "base" },
amount: "10000.00",
}),
});import requests
url = "https://testnet.relayer.fi/v1/payout/onramp/quote"
payload = {
"source_currency": "mxn",
"destination_currency": "usdc",
"source_amount": "1000.00",
"destination_amount": "50.00"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_currency: 'mxn',
destination_currency: 'usdc',
source_amount: '1000.00',
destination_amount: '50.00'
})
};
fetch('https://testnet.relayer.fi/v1/payout/onramp/quote', 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://testnet.relayer.fi/v1/payout/onramp/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_currency' => 'mxn',
'destination_currency' => 'usdc',
'source_amount' => '1000.00',
'destination_amount' => '50.00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.relayer.fi/v1/payout/onramp/quote"
payload := strings.NewReader("{\n \"source_currency\": \"mxn\",\n \"destination_currency\": \"usdc\",\n \"source_amount\": \"1000.00\",\n \"destination_amount\": \"50.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://testnet.relayer.fi/v1/payout/onramp/quote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source_currency\": \"mxn\",\n \"destination_currency\": \"usdc\",\n \"source_amount\": \"1000.00\",\n \"destination_amount\": \"50.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/payout/onramp/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_currency\": \"mxn\",\n \"destination_currency\": \"usdc\",\n \"source_amount\": \"1000.00\",\n \"destination_amount\": \"50.00\"\n}"
response = http.request(request)
puts response.read_body{
"source_amount": "1000.00",
"source_currency": "mxn",
"destination_amount": "49.45",
"destination_currency": "usdc",
"midmarket_rate": "0.0500",
"sell_rate": "0.0497",
"display_rate": "1 USD ≈ 20.10 MXN",
"network_fee_percent": 0.6,
"network_fee_amount": "0.30",
"service_fee_percent": 0.5,
"service_fee_amount": "0.25",
"total_fee_percent": 1.1,
"total_fee_amount": "0.55",
"developer_fee_percent": 0.5,
"developer_fee_amount": "0.25",
"estimated_arrival": "≈ 2 minutes after deposit"
}Authorizations
Use this format: ApiKey <your_api_key>
Body
Source fiat currency code
usd, eur, mxn, brl, gbp "mxn"
Destination stablecoin code
usdc, usdt "usdc"
Amount in source fiat currency. Provide this OR destination_amount.
"1000.00"
Desired amount in destination stablecoin. Provide this OR source_amount.
"50.00"
Response
Live quote with rate + fee breakdown
"1000.00"
"mxn"
"49.45"
"usdc"
"0.0500"
"0.0497"
"1 USD ≈ 20.10 MXN"
Network conversion fee (Bridge spread).
0.6
"0.30"
Our service fee (Relayer margin).
0.5
"0.25"
All-in fee vs midmarket rate.
1.1
"0.55"
0.5
"0.25"
"≈ 2 minutes after deposit"