GET /v1/rates/spread
Returns the current best bid, best ask, mid-price, and spread for the requested pair. Data is aggregated across all contributing exchanges to produce a consolidated book top.
Bid/ask values are approximated from 5-minute OHLCV candles -- the 5m low is used as the bid and the 5m high as the ask. This is not live order-book depth. Values may differ significantly from what you would see on an exchange order book, particularly for illiquid pairs. Do not use this endpoint for execution decisions or real-time hedging without accounting for this approximation.
This endpoint is available on Builder, Professional, and Enterprise plans. It is not available on the Free plan.
Authentication
This endpoint requires an API key. See Authentication.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pair | string | Yes | Pair identifier (e.g., USDTNGN). |
Response
| Field | Type | Description |
|---|---|---|
pair | string | The requested pair. |
bid | number | Best bid price across all contributing exchanges. |
ask | number | Best ask price across all contributing exchanges. |
mid | number | Mid-price, calculated as (bid + ask) / 2. |
spread | number | Absolute spread (ask - bid). |
spread_bps | number | Spread in basis points, calculated as (spread / mid) * 10000. |
timestamp | string | ISO 8601 timestamp of the snapshot. |
sources | array | Per-exchange bid/ask breakdown. |
sources[].exchange | string | Exchange name. |
sources[].bid | number | Best bid on this exchange. |
sources[].ask | number | Best ask on this exchange. |
Examples
curl -X GET "https://api.moxiemetrx.com/v1/rates/spread?pair=USDTNGN" \
-H "X-API-Key: your_key"
import requests
response = requests.get(
"https://api.moxiemetrx.com/v1/rates/spread",
params={"pair": "USDTNGN"},
headers={"X-API-Key": "your_key"},
)
data = response.json()
print(f"Bid: {data['bid']} Ask: {data['ask']} Spread: {data['spread_bps']:.1f} bps")
Response:
{
"pair": "USDTNGN",
"bid": 1415.50,
"ask": 1417.00,
"mid": 1416.25,
"spread": 1.50,
"spread_bps": 10.59,
"timestamp": "2026-03-23T12:00:00Z",
"sources": [
{ "exchange": "quidax", "bid": 1415.00, "ask": 1416.80 },
{ "exchange": "luno", "bid": 1415.50, "ask": 1417.00 }
],
"note": "bid/ask approximated from 5m low/high — not order-book depth"
}
This endpoint requires a Builder, Professional, or Enterprise plan. Free tier requests return 403 Forbidden. See Pricing to upgrade.