Get a market quote
curl --request POST \
--url https://router-gateway-v3-production.up.railway.app/quote \
--header 'Content-Type: application/json' \
--data '
{
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"amountFormat": "readable",
"orderType": "market_order",
"fromAmount": "1",
"returnFullRoute": true
}
'import requests
url = "https://router-gateway-v3-production.up.railway.app/quote"
payload = {
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"amountFormat": "readable",
"orderType": "market_order",
"fromAmount": "1",
"returnFullRoute": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from: 'Bitcoin.BTC',
to: 'Ethereum.USDC',
amountFormat: 'readable',
orderType: 'market_order',
fromAmount: '1',
returnFullRoute: true
})
};
fetch('https://router-gateway-v3-production.up.railway.app/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://router-gateway-v3-production.up.railway.app/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([
'from' => 'Bitcoin.BTC',
'to' => 'Ethereum.USDC',
'amountFormat' => 'readable',
'orderType' => 'market_order',
'fromAmount' => '1',
'returnFullRoute' => true
]),
CURLOPT_HTTPHEADER => [
"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://router-gateway-v3-production.up.railway.app/quote"
payload := strings.NewReader("{\n \"from\": \"Bitcoin.BTC\",\n \"to\": \"Ethereum.USDC\",\n \"amountFormat\": \"readable\",\n \"orderType\": \"market_order\",\n \"fromAmount\": \"1\",\n \"returnFullRoute\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://router-gateway-v3-production.up.railway.app/quote")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"Bitcoin.BTC\",\n \"to\": \"Ethereum.USDC\",\n \"amountFormat\": \"readable\",\n \"orderType\": \"market_order\",\n \"fromAmount\": \"1\",\n \"returnFullRoute\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router-gateway-v3-production.up.railway.app/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"Bitcoin.BTC\",\n \"to\": \"Ethereum.USDC\",\n \"amountFormat\": \"readable\",\n \"orderType\": \"market_order\",\n \"fromAmount\": \"1\",\n \"returnFullRoute\": true\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "00000000-0000-4000-8000-000000000001",
"orderType": "market_order",
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"expiry": "2026-05-04T12:10:00Z",
"estimatedOut": "100000",
"route": [
{
"venue": "cctp_standard",
"from": "Ethereum.USDC",
"to": "Base.USDC",
"amountIn": "5",
"providerAmountIn": "4.995",
"providerAmountOut": "4.993",
"amountOut": "4.992",
"paymasterReimbursement": {
"inputRetained": "0.005",
"outputRetained": "0.001"
}
}
],
"amountFormat": "readable",
"expectedSwapTimeMs": 63000,
"quoteCandidates": [
"<unknown>"
]
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}API Endpoints (beta)
Get a market quote
POST
/
quote
Get a market quote
curl --request POST \
--url https://router-gateway-v3-production.up.railway.app/quote \
--header 'Content-Type: application/json' \
--data '
{
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"amountFormat": "readable",
"orderType": "market_order",
"fromAmount": "1",
"returnFullRoute": true
}
'import requests
url = "https://router-gateway-v3-production.up.railway.app/quote"
payload = {
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"amountFormat": "readable",
"orderType": "market_order",
"fromAmount": "1",
"returnFullRoute": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from: 'Bitcoin.BTC',
to: 'Ethereum.USDC',
amountFormat: 'readable',
orderType: 'market_order',
fromAmount: '1',
returnFullRoute: true
})
};
fetch('https://router-gateway-v3-production.up.railway.app/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://router-gateway-v3-production.up.railway.app/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([
'from' => 'Bitcoin.BTC',
'to' => 'Ethereum.USDC',
'amountFormat' => 'readable',
'orderType' => 'market_order',
'fromAmount' => '1',
'returnFullRoute' => true
]),
CURLOPT_HTTPHEADER => [
"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://router-gateway-v3-production.up.railway.app/quote"
payload := strings.NewReader("{\n \"from\": \"Bitcoin.BTC\",\n \"to\": \"Ethereum.USDC\",\n \"amountFormat\": \"readable\",\n \"orderType\": \"market_order\",\n \"fromAmount\": \"1\",\n \"returnFullRoute\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://router-gateway-v3-production.up.railway.app/quote")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"Bitcoin.BTC\",\n \"to\": \"Ethereum.USDC\",\n \"amountFormat\": \"readable\",\n \"orderType\": \"market_order\",\n \"fromAmount\": \"1\",\n \"returnFullRoute\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router-gateway-v3-production.up.railway.app/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"Bitcoin.BTC\",\n \"to\": \"Ethereum.USDC\",\n \"amountFormat\": \"readable\",\n \"orderType\": \"market_order\",\n \"fromAmount\": \"1\",\n \"returnFullRoute\": true\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "00000000-0000-4000-8000-000000000001",
"orderType": "market_order",
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"expiry": "2026-05-04T12:10:00Z",
"estimatedOut": "100000",
"route": [
{
"venue": "cctp_standard",
"from": "Ethereum.USDC",
"to": "Base.USDC",
"amountIn": "5",
"providerAmountIn": "4.995",
"providerAmountOut": "4.993",
"amountOut": "4.992",
"paymasterReimbursement": {
"inputRetained": "0.005",
"outputRetained": "0.001"
}
}
],
"amountFormat": "readable",
"expectedSwapTimeMs": 63000,
"quoteCandidates": [
"<unknown>"
]
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}Body
application/json
Required string length:
1 - 96Example:
"Bitcoin.BTC"
Required string length:
1 - 96Example:
"Ethereum.USDC"
Available options:
readable, raw Example:
"readable"
Order type. Defaults to market_order.
Available options:
market_order, market Example:
"market_order"
Required string length:
1 - 96Example:
"1"
When true, include the winning route rows in the response. Defaults to true.
Example:
true
Response
Market quote created by the internal router API.
Example:
"00000000-0000-4000-8000-000000000001"
Available options:
market_order Example:
"market_order"
Example:
"Bitcoin.BTC"
Example:
"Ethereum.USDC"
Example:
"2026-05-04T12:10:00Z"
Example:
"100000"
Route legs describing the hop-by-hop execution of the winning quote path.
Show child attributes
Show child attributes
Available options:
readable, raw Example:
"readable"
Required range:
x >= 0Example:
63000
Debug-only quote candidate records returned when includeQuoteCandidates is true. Each record includes family, status, venues, latency_ms, and raw_quote for successful candidates.
⌘I