Get a swap quote
curl --request GET \
--url https://api.rach.finance/api/v1/swap/quoteimport requests
url = "https://api.rach.finance/api/v1/swap/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.rach.finance/api/v1/swap/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://api.rach.finance/api/v1/swap/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.rach.finance/api/v1/swap/quote"
req, _ := http.NewRequest("GET", url, nil)
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.rach.finance/api/v1/swap/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rach.finance/api/v1/swap/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"estimated_seconds": 30,
"expires_at": 1720000030,
"from_amount": "1000000",
"from_chain": "POL",
"from_token": "<string>",
"platform_fee": "3000",
"to_amount_expected": "997012",
"to_amount_min": "992047",
"to_chain": "BSC",
"to_token": "<string>"
}Swap
Get a swap quote
Returns a price quote for swapping tokens between any two supported networks and token pairs. No authentication required.
Routing is handled internally:
- Same-chain pairs on POL or BSC — executed via the Rach FiatSwapV2 smart contract (0.3% platform fee)
- All other pairs — routed through a cross-chain bridge
The response format is identical regardless of the route taken.
amount_in must be in base units (wei / smallest denomination) as an integer string:
- USDT on Polygon (6 decimals):
1000000= 1 USDT - MATIC / BNB (18 decimals):
1000000000000000000= 1 MATIC / BNB - Use
"native"as the token address for the chain’s native coin (MATIC on POL, BNB on BSC)
GET
/
api
/
v1
/
swap
/
quote
Get a swap quote
curl --request GET \
--url https://api.rach.finance/api/v1/swap/quoteimport requests
url = "https://api.rach.finance/api/v1/swap/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.rach.finance/api/v1/swap/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://api.rach.finance/api/v1/swap/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.rach.finance/api/v1/swap/quote"
req, _ := http.NewRequest("GET", url, nil)
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.rach.finance/api/v1/swap/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rach.finance/api/v1/swap/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"estimated_seconds": 30,
"expires_at": 1720000030,
"from_amount": "1000000",
"from_chain": "POL",
"from_token": "<string>",
"platform_fee": "3000",
"to_amount_expected": "997012",
"to_amount_min": "992047",
"to_chain": "BSC",
"to_token": "<string>"
}Query Parameters
Response
Swap quote

