Endpoint
List conversion offers
GET
/v1/conversions/offersNot stored; asking allocates nothing at any venue.
- Scope a restricted key needs
conversions:read- Publishable key
- Not allowed: secret or restricted key only
- Idempotency-Key
- Not used. A GET is already safe to repeat.
Parameters
| Parameter | Type and place | Meaning |
|---|---|---|
from_assetrequired | stringquery | The asset id to convert from. |
to_assetrequired | stringquery | The asset id to convert to. |
amountrequired | stringquery | Amount of from_asset, or max. Pattern ^(max|\d+(\.\d+)?)$. |
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/conversions/offers?from_asset=bitcoin:btc&to_asset=base:usdc&amount=0.01" \
-H "Authorization: Bearer $ORRERIE_SECRET_KEY"JavaScript
const response = await fetch("https://api.orrerie.com/v1/conversions/offers?from_asset=bitcoin:btc&to_asset=base:usdc&amount=0.01", {
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/conversions/offers",
params={
"from_asset": "bitcoin:btc",
"to_asset": "base:usdc",
"amount": "0.01",
},
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/conversions/offers?from_asset=bitcoin:btc&to_asset=base:usdc&amount=0.01');
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 conversion_offer objects. Headers: Orrerie-Request-Id.
Example response, 200
{
"object": "list",
"url": "/v1/conversions/offers",
"has_more": false,
"data": [
{
"object": "conversion_offer",
"venue": "relay",
"available": true,
"refusal_reason": null,
"from": {
"asset": "bitcoin:btc",
"amount": "0.01000000"
},
"to": {
"asset": "base:usdc",
"amount_estimated": "1168.420000"
},
"rate": "116842.00",
"fees": [
{
"kind": "route_fee",
"amount": "1.38",
"currency": "USD"
},
{
"kind": "network_fee",
"amount": "0.61",
"currency": "USD"
}
],
"estimated_seconds": 900,
"expires_at": "2026-10-12T11:01:00.000Z"
},
{
"object": "conversion_offer",
"venue": "thorchain",
"available": true,
"refusal_reason": null,
"from": {
"asset": "bitcoin:btc",
"amount": "0.01000000"
},
"to": {
"asset": "base:usdc",
"amount_estimated": "1165.900000"
},
"rate": "116590.00",
"fees": [
{
"kind": "route_fee",
"amount": "3.52",
"currency": "USD"
}
],
"estimated_seconds": 1500,
"expires_at": "2026-10-12T11:01:00.000Z"
},
{
"object": "conversion_offer",
"venue": "sideshift",
"available": false,
"refusal_reason": "pair_not_supported",
"from": {
"asset": "bitcoin:btc",
"amount": "0.01000000"
},
"to": {
"asset": "base:usdc",
"amount_estimated": null
},
"rate": null,
"fees": [],
"estimated_seconds": null,
"expires_at": 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 |
|---|---|---|
asset_unsupported | 400 | Not an asset id from GET /v1/assets, or not usable for this purpose. |
insufficient_balance | 409 | The available balance (amount minus reserved) of the source asset is too low; error.available gives it. |