Endpoint
List exchange rates
GET
/v1/ratesThe price of one unit of each asset in currency.
- Scope a restricted key needs
any key- Publishable key
- Allowed
- Idempotency-Key
- Not used. A GET is already safe to repeat.
Parameters
| Parameter | Type and place | Meaning |
|---|---|---|
currency | stringquery | Fiat code. Default USD. |
assets | stringquery | Comma-separated asset ids. Default: all. |
Orrerie-Version | stringheader | API version date. Default: the version the key was created with. Example 2026-10-11. |
Example request
curl
curl https://api.orrerie.com/v1/rates \
-H "Authorization: Bearer $ORRERIE_SECRET_KEY"JavaScript
const response = await fetch("https://api.orrerie.com/v1/rates", {
headers: {
Authorization: `Bearer ${process.env.ORRERIE_SECRET_KEY}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(`${result.error.code}: ${result.error.message}`);
console.log(result);Python
import os
import requests
response = requests.get(
"https://api.orrerie.com/v1/rates",
headers={"Authorization": f"Bearer {os.environ['ORRERIE_SECRET_KEY']}"},
timeout=30,
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)PHP
<?php
$request = curl_init('https://api.orrerie.com/v1/rates');
curl_setopt_array($request, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ORRERIE_SECRET_KEY'),
],
]);
$body = curl_exec($request);
if ($body === false) {
throw new RuntimeException(curl_error($request));
}
$result = json_decode($body, true);
if (curl_getinfo($request, CURLINFO_HTTP_CODE) >= 400) {
throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);Responses
200 OK
A list whose data holds rate objects. Headers: Orrerie-Request-Id.
Example response, 200
{
"object": "list",
"url": "/v1/rates",
"has_more": false,
"data": [
{
"object": "rate",
"asset": "bitcoin:btc",
"currency": "USD",
"rate": "117043.12",
"as_of": "2026-10-12T10:59:40.000Z",
"source": "market_feed",
"fiat_table_as_of": null
},
{
"object": "rate",
"asset": "base:usdc",
"currency": "USD",
"rate": "0.9999",
"as_of": "2026-10-12T10:59:40.000Z",
"source": "market_feed",
"fiat_table_as_of": null
},
{
"object": "rate",
"asset": "litecoin:ltc",
"currency": "USD",
"rate": "107.74",
"as_of": "2026-10-12T10:59:40.000Z",
"source": "market_feed",
"fiat_table_as_of": null
}
]
}Any other status: an error
A status of 400 or above answers with the error object. Branch on its code, never on its message.
Errors
Beside the errors every call can answer with (a bad key, a missing scope, the rate limit), this call answers with:
| Code | HTTP | Meaning |
|---|---|---|
currency_unsupported | 400 | Not a pricing currency the platform has a rate for. |
price_unavailable | 503 | No fresh price for the asset or currency. A stale price is never used for a quote. |