Skip to main content

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.

warning

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

note

This endpoint requires an API key. See Authentication.

Parameters

ParameterTypeRequiredDescription
pairstringYesPair identifier (e.g., USDTNGN).

Response

FieldTypeDescription
pairstringThe requested pair.
bidnumberBest bid price across all contributing exchanges.
asknumberBest ask price across all contributing exchanges.
midnumberMid-price, calculated as (bid + ask) / 2.
spreadnumberAbsolute spread (ask - bid).
spread_bpsnumberSpread in basis points, calculated as (spread / mid) * 10000.
timestampstringISO 8601 timestamp of the snapshot.
sourcesarrayPer-exchange bid/ask breakdown.
sources[].exchangestringExchange name.
sources[].bidnumberBest bid on this exchange.
sources[].asknumberBest ask on this exchange.

Examples

curl
curl -X GET "https://api.moxiemetrx.com/v1/rates/spread?pair=USDTNGN" \
-H "X-API-Key: your_key"
Python
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"
}
warning

This endpoint requires a Builder, Professional, or Enterprise plan. Free tier requests return 403 Forbidden. See Pricing to upgrade.