curl --request GET \
--url "https://api.stablepay.co/api/v1/quote/exchange_rate?source_currency=<SOURCE_CURRENCY>&target_currency=<TARGET_CURRENCY>" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>"
const response = await fetch("https://api.stablepay.co/api/v1/quote/exchange_rate?source_currency=<SOURCE_CURRENCY>&target_currency=<TARGET_CURRENCY>", {
method: "GET",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>"
}
});
console.log(await response.json());
{
"rate": {
"rate_pair_id": "usd_usdc",
"source_currency": "USD",
"target_currency": "USDC",
"rate": "0.9998"
},
"as_of": 1718726400
}
Stablecoin Exchange API
Retrieve the current pair rate
Retrieve the current pair rate
GET
/
api
/
v1
/
quote
/
exchange_rate
curl --request GET \
--url "https://api.stablepay.co/api/v1/quote/exchange_rate?source_currency=<SOURCE_CURRENCY>&target_currency=<TARGET_CURRENCY>" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>"
const response = await fetch("https://api.stablepay.co/api/v1/quote/exchange_rate?source_currency=<SOURCE_CURRENCY>&target_currency=<TARGET_CURRENCY>", {
method: "GET",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>"
}
});
console.log(await response.json());
{
"rate": {
"rate_pair_id": "usd_usdc",
"source_currency": "USD",
"target_currency": "USDC",
"rate": "0.9998"
},
"as_of": 1718726400
}
See authentication, signing, data conventions, and errors. Regenerate the timestamp, nonce, and signature on every retry.
GET /quote/exchange_rate Returns the current mid-market rate for display only.
Request headers
string
required
Bearer API Key.
string
required
Unix seconds, within five minutes of server time.
string
required
Unique per request, 16–64 characters.
string
required
Lowercase hexadecimal HMAC-SHA256 signature for the exact request body.
Request parameters
string
10 digits; omit for merchant apps, required for service-provider apps
string
required
Sell currency, such as USD
string
required
Buy currency, such as USDC
Response
object
required
Rate object
string
required
Pair ID
string
required
Sell currency
string
required
Buy currency
string
required
Mid-market rate
integer
required
Snapshot time
Status and errors
404 unknown pair.curl --request GET \
--url "https://api.stablepay.co/api/v1/quote/exchange_rate?source_currency=<SOURCE_CURRENCY>&target_currency=<TARGET_CURRENCY>" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>"
const response = await fetch("https://api.stablepay.co/api/v1/quote/exchange_rate?source_currency=<SOURCE_CURRENCY>&target_currency=<TARGET_CURRENCY>", {
method: "GET",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>"
}
});
console.log(await response.json());
{
"rate": {
"rate_pair_id": "usd_usdc",
"source_currency": "USD",
"target_currency": "USDC",
"rate": "0.9998"
},
"as_of": 1718726400
}
Last modified on October 29, 2026
Was this page helpful?
