Market Data API
Hosted proxy for public crypto exchange and market-data endpoints — not a general-purpose web scraper. Authenticate with an API key, pass an allowlisted target URL, and receive the upstream response with rate-limit and cache headers.
Base URL: https://api.nexrade.com
For multi-exchange trading logic (orders, balances, aggregators), use the open-source nexrade library — it can route public market-data traffic through this API.
Authentication
All requests require an API key (created in the dashboard; starts with nxr_). Pass it either as:
- Header (preferred):
X-API-Key: nxr_… - Query string:
?api_key=nxr_…
If both are present, the query param wins. Prefer the header so the key does not end up in access logs or browser history.
# Preferred — header curl "https://api.nexrade.com/market-data" -H "X-API-Key: nxr_your_api_key" -G --data-urlencode "url=https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT" # Also supported — query string curl "https://api.nexrade.com/market-data?api_key=nxr_your_api_key&url=https%3A%2F%2Fapi.binance.com%2Fapi%2Fv3%2Fticker%2Fprice%3Fsymbol%3DBTCUSDT"
Missing key → 400. Invalid / disabled / expired key → 401 Unauthorized.
Allowed domains
Requests are restricted to crypto exchange APIs and market-data providers. Arbitrary websites, internal hosts, and non-allowlisted domains return 403. Only exact API hostnames are accepted — not marketing sites or arbitrary subdomains.
Live catalog from GET /market-data/allowed-domains.
https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDTLoading allowlist…
Endpoints
The market-data endpoint accepts a required url query parameter. The value must be a fully qualified HTTP(S) URL on an allowlisted exchange or data-provider host.
Any other query parameters are appended to the upstream URL — useful for passing through API-specific arguments (symbols, intervals, IDs) without URL-encoding them into url= yourself. Reserved names (api_key, url) are stripped.
GET/market-data
Route the request through the proxy pool with IP rotation. Use this for production access to rate-limited or IP-sensitive exchange endpoints.
GET /market-data?url={TARGET_URL}
Header: X-API-Key: nxr_...
# or: GET /market-data?api_key=nxr_...&url={TARGET_URL}Response headers
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests per window |
| X-RateLimit-Remaining | Requests left in the current window |
| X-RateLimit-Reset | Unix timestamp when the window resets |
| X-RateLimit-Scope | account, or ip when the free-plan IPv4 guard is tighter |
| X-Cache | HIT or MISS (when cached) |
Rate limits
Limits are applied per account and shared across all active API keys in a fixed one-minute window. Free traffic also has a client-IP guard. Exceeding the limit returns 429 Too Many Requests.
| Plan | Requests / min | API keys | Key expiry |
|---|---|---|---|
| Free | 90 | 1 | 30 days |
| Pro | 700 | 5 | Never |
| Enterprise | 3,500 | 10 | Never |
Per-user request fairness — to keep one account from monopolising the shared proxy pool, parallel requests on the same account are also subject to a short, plan-scaled concurrency guard. If you exceed it, the API returns 429 with a short retry hint in the body; no additional headers, no separate counter to track. Stay within the per-minute quota and you will not see this in practice.
Errors
Errors return JSON with a machine-readable error field and an optional message.
| Status | Meaning |
|---|---|
| 400 | Missing or invalid url (or missing API key) |
| 401 | Invalid or expired API key |
| 403 | Target host not allowed (unparseable URL or non-allowlisted domain) — admin-disabled accounts also return 403 with code: user_disabled |
| 429 | Plan rate limit exceeded — for free, the IP guard may fire first; the plan-vs-IP distinction is reflected in the X-RateLimit-Scope header |
| 502 | Upstream or proxy failure |
| 500 | Internal server error (e.g. rate-limiting service unavailable) |
{
"error": "Plan rate limit exceeded"
}Python client
nexrade-reqnexrade-req is the official Python client for the Market Data API. It mirrors a familiar HTTP surface and, with an API key, routes traffic through the Nexrade proxy so each public request can use a fresh IP.
For multi-exchange trading (orders, balances, Spot/Futures aggregators), use nexrade instead — a separate trading library that can call this API for public market data.
Package: pypi.org/project/nexrade-req · Requires Python ≥ 3.9
Install
pip install nexrade-req
Direct request (no relay)
Without an API key, the client behaves like a normal fast HTTP client.
import nexrade_req as req
r = req.get(
"https://api.binance.com/api/v3/ticker/price",
params={"symbol": "BTCUSDT"},
)
print(r.status_code, r.json())With Nexrade relay
Pass your Nexrade API key (from the dashboard) to route through /market-data automatically.
from nexrade_req import Client
client = Client(api_key="nxr_your_api_key")
r = client.get(
"https://api.binance.com/api/v3/ticker/price",
params={"symbol": "ETHUSDT"},
)
print(r.json())Session reuse
from nexrade_req import Client
with Client(api_key="nxr_your_api_key") as c:
r1 = c.get("https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT")
r2 = c.get("https://api.binance.com/api/v3/ticker/price?symbol=ETHUSDT")
print(r1.json(), r2.json())Client options
| Parameter | Default | Description |
|---|---|---|
| api_key | None | Nexrade API key — enables relay routing |
| base_urls | ("https://api.nexrade.com",) | List of relay base URLs |
| endpoint | "market-data" | Relay endpoint path |
| max_retries | 1 | Retry attempts on failure |
| timeout | 6 | Request timeout in seconds |
| is_random_base_url | True | Rotate relay nodes randomly |
| auto_mode | False | Smart failover — see below |
Smart auto-mode (relay ⇄ direct failover)
When auto_mode=True the client watches every relay response. If the relay signals a limit (HTTP 429 / 503, or X-RateLimit-Remaining: 0), the client immediately switches to direct-mode — subsequent requests skip the relay and go straight to the upstream exchange — for the duration of the relay’s Retry-After header (default 60 s). Once the cooldown elapses, the client flips back to relay automatically.
Response helpers
Responses expose .status_code, .text, .content, .json(), .headers, .url, and .raise_for_status().
Errors
from nexrade_req import Client
from nexrade_req.exceptions import NexradeException
client = Client(api_key="nxr_your_api_key")
try:
r = client.get("https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT")
r.raise_for_status()
except NexradeException as e:
print("All relay attempts failed:", e)Client(api_key=…). Full package details: PyPI · nexrade-reqHTTP samples
Prefer the official Python client (nexrade-req) when possible. These examples call the REST API directly. Auth is shown via the X-API-Key header (preferred). Query api_key= is also accepted.
curl
curl "https://api.nexrade.com/market-data" \ -H "X-API-Key: nxr_your_api_key" \ -G --data-urlencode "url=https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"
JavaScript
const endpoint = new URL("https://api.nexrade.com/market-data");
endpoint.searchParams.set(
"url",
"https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"
);
const res = await fetch(endpoint, {
headers: { "X-API-Key": process.env.NEXRADE_API_KEY },
});
const data = await res.json();
console.log(data);Python (requests)
import os
import requests
r = requests.get(
"https://api.nexrade.com/market-data",
headers={"X-API-Key": os.environ["NEXRADE_API_KEY"]},
params={
"url": "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"
},
timeout=15,
)
r.raise_for_status()
print(r.json())