Get market rate
curl --request GET \
--url https://api.paycrest.io/v2/provider/rates/{token}/{fiat} \
--header 'API-Key: <api-key>'import requests
url = "https://api.paycrest.io/v2/provider/rates/{token}/{fiat}"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://api.paycrest.io/v2/provider/rates/{token}/{fiat}', 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.paycrest.io/v2/provider/rates/{token}/{fiat}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>"
],
]);
$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.paycrest.io/v2/provider/rates/{token}/{fiat}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
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.paycrest.io/v2/provider/rates/{token}/{fiat}")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycrest.io/v2/provider/rates/{token}/{fiat}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Operation successful",
"data": {
"buy": {
"marketRate": "<string>",
"minimumRate": "<string>",
"maximumRate": "<string>",
"position": {
"bestPublicRate": "<string>",
"yourEffectiveRate": "<string>",
"deltaVsBest": "<string>"
}
},
"sell": {
"marketRate": "<string>",
"minimumRate": "<string>",
"maximumRate": "<string>",
"position": {
"bestPublicRate": "<string>",
"yourEffectiveRate": "<string>",
"deltaVsBest": "<string>"
}
}
}
}Provider
Get Market Rate
GET
/
provider
/
rates
/
{token}
/
{fiat}
Get market rate
curl --request GET \
--url https://api.paycrest.io/v2/provider/rates/{token}/{fiat} \
--header 'API-Key: <api-key>'import requests
url = "https://api.paycrest.io/v2/provider/rates/{token}/{fiat}"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://api.paycrest.io/v2/provider/rates/{token}/{fiat}', 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.paycrest.io/v2/provider/rates/{token}/{fiat}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>"
],
]);
$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.paycrest.io/v2/provider/rates/{token}/{fiat}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
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.paycrest.io/v2/provider/rates/{token}/{fiat}")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycrest.io/v2/provider/rates/{token}/{fiat}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Operation successful",
"data": {
"buy": {
"marketRate": "<string>",
"minimumRate": "<string>",
"maximumRate": "<string>",
"position": {
"bestPublicRate": "<string>",
"yourEffectiveRate": "<string>",
"deltaVsBest": "<string>"
}
},
"sell": {
"marketRate": "<string>",
"minimumRate": "<string>",
"maximumRate": "<string>",
"position": {
"bestPublicRate": "<string>",
"yourEffectiveRate": "<string>",
"deltaVsBest": "<string>"
}
}
}
}Returns buy and sell market rate bands (reference rate plus min/max tolerance) for a token/fiat pair. Use this to validate whether a sender-provided Response shape (
Each side object:
Numeric values are returned as strings (decimal). Either side may be omitted depending on corridor configuration.
When qualifying public offers exist for this corridor, each side includes a
Interpreting
Example when
rate on order creation is within allowed bounds.
Response shape (data)
| Field | Type | Description |
|---|---|---|
buy | object (optional) | Buy-side band — see fields below |
sell | object (optional) | Sell-side band — see fields below |
| Field | Type | Description |
|---|---|---|
marketRate | string | Reference market rate for this side (fiat per crypto) |
minimumRate | string | Minimum allowed rate for this side |
maximumRate | string | Maximum allowed rate for this side |
position | object (optional) | Rate benchmark vs. best public peer — see below |
position object
When qualifying public offers exist for this corridor, each side includes a position object so you can see how your effective rate compares to the best public peer:
| Field | Type | Description |
|---|---|---|
bestPublicRate | string | Best rate among enabled non-testnet public peers (highest for sell; lowest for buy) |
yourEffectiveRate | string | Your own effective rate for this corridor and side |
deltaVsBest | string | yourEffectiveRate − bestPublicRate |
deltaVsBest:
- Sell (off-ramp): a positive delta means your rate is higher than the best peer — you are more competitive.
- Buy (on-ramp): a negative delta means your rate is lower than the best peer — you are more competitive.
position is omitted when:
- No qualifying public offers exist for the corridor, or
- You have no effective rate configured for this corridor.
marketRate, minimumRate, and maximumRate are unchanged — position is purely additive (backward compatible).
The benchmark pool uses all enabled, non-testnet networks; it is not filtered by the {token}/{fiat} path parameters’ network.
Example
{
"status": "success",
"message": "Rate fetched successfully",
"data": {
"sell": {
"marketRate": "1605.00",
"minimumRate": "1580.00",
"maximumRate": "1630.00",
"position": {
"bestPublicRate": "1608.00",
"yourEffectiveRate": "1605.00",
"deltaVsBest": "-3.00"
}
},
"buy": {
"marketRate": "1598.00",
"minimumRate": "1575.00",
"maximumRate": "1620.00",
"position": {
"bestPublicRate": "1595.00",
"yourEffectiveRate": "1598.00",
"deltaVsBest": "3.00"
}
}
}
}
position is omitted (no public benchmark available):
{
"status": "success",
"message": "Rate fetched successfully",
"data": {
"sell": {
"marketRate": "1605.00",
"minimumRate": "1580.00",
"maximumRate": "1630.00"
}
}
}
GET /v1/provider/rates/{token}/{fiat} uses the same response shape as this v2 route, including the position field. See Get Market Rate (v1).