API Documentation
Welcome to the ForeDex API. High-fidelity cryptocurrency market data, on-chain metrics, and institutional tracking via a RESTful interface.
Getting Started
The ForeDex API follows REST principles, predictable URLs, and JSON-encoded responses. All endpoints are versioned for stability. Every request must include the X-API-KEY header.
Base URL (API only)
https://api.foredex.io/external/v1Use this URL for all API calls. This is the backend; do not serve the docs from this host.
Status
Architecture & Domains
ForeDex uses separate domains for the API and this documentation. This is the recommended, secure design.
- api.foredex.io — Backend API only. Serves JSON; no HTML. All endpoints documented here are called against this host.
- docs.foredex.io — This documentation site. Static/SSR frontend; no API keys are stored here.
- foredex.io — Main product frontend (app, dashboard).
Authentication
Include your API key in the X-API-KEY header. Missing or invalid keys return 401 Unauthorized.
Header
X-API-KEY in every request.
curl -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/market/oi?asset=BTC"API Keys
Manage keys in the ForeDex Dashboard. Types:
- Read-Only: Market data and metrics.
- Full Access: All services.
Best Practice
Do not share or commit API keys. Use environment variables or secret managers.
Rate Limits
Rate limits are tiered by subscription.
Standard
Default 100 requests per minute. Exceeding returns 429 Too Many Requests.
Data Models
Responses are structured JSON. Common shape:
interface DataPoint {
timestamp: number; // Unix ms
value: number;
source?: string;
}Info API
Utilities for supported symbols and common parameter values. All endpoints are GET and require the X-API-KEY header.
Returns supported asset symbols for the external API (e.g. BTC, ETH).
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/info/symbols"Response
{
"success": true,
"data": [
{ "symbol": "BTC", "name": "Bitcoin" },
{ "symbol": "ETH", "name": "Ethereum" }
],
"timestamp": "2026-02-06T00:00:00.000Z"
}Returns common period/resolution values (e.g. 1m, 1h, 1d, 1w).
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/info/periods"Response
{
"success": true,
"data": ["1m", "5m", "15m", "30m", "1h", "4h", "1d", "1w"],
"timestamp": "2026-02-06T00:00:00.000Z"
}Open Interest (Derivatives)
Open Interest series for BTC/ETH derivatives. Call the backend at https://api.foredex.io/external/v1/market/oi with optional query parameters.
Returns open interest time series for the given asset, exchange, timeframe, and interval. Defaults: asset=BTC, exchange=all_exchanges, timeframe=1W, interval=1d, marketType=FUTURES.
Parameters
| Parameter | Type | Req | Default | Description |
|---|---|---|---|---|
| asset | string | No | BTC | BTC or ETH |
| exchange | string | No | all_exchanges | Exchange or all_exchanges |
| timeframe | string | No | 1W | Timeframe |
| interval | string | No | 1d | 1d, 1w, etc. |
| marketType | string | No | FUTURES | FUTURES or PERP |
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/market/oi?asset=BTC&interval=1d"Response
{
"metric": "open-interest",
"asset": "BTC",
"exchange": "all_exchanges",
"marketType": "FUTURES",
"timeframe": "1W",
"interval": "1d",
"timestamps": [1710000000000, 1710086400000],
"values": [1234567890.12, 1256789012.34],
"prices": [65000.12, 66200.34],
"query_status": "success"
}Funding Rate (Derivatives)
Funding rate time series for BTC/ETH derivatives.
Returns funding rate series for the given asset and options. Same parameter semantics as Open Interest.
Parameters
| Parameter | Type | Req | Default | Description |
|---|---|---|---|---|
| asset | string | No | BTC | BTC or ETH |
| exchange | string | No | all_exchanges | Exchange or all_exchanges |
| timeframe | string | No | 1W | Timeframe |
| interval | string | No | 1d | 1d, 1w |
| marketType | string | No | FUTURES | FUTURES or PERP |
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/market/funding-rate?asset=BTC"Response
{
"metric": "funding-rate",
"asset": "BTC",
"exchange": "all_exchanges",
"marketType": "FUTURES",
"timestamps": [1710000000000, 1710086400000],
"values": [0.00012, -0.00008],
"query_status": "success"
}CVD (Cumulative Volume Delta)
Measure the net difference between buying and selling volume over time. Supported exchanges: binance, okx, bybit.
Returns CVD data for the given exchange, symbol, market type, and interval.
Parameters
| Parameter | Type | Req | Default | Description |
|---|---|---|---|---|
| exchange | string | No | binance | binance, okx, bybit |
| symbol | string | No | BTCUSDT | Trading pair |
| marketType | string | No | SPOT | SPOT or FUTURES |
| interval | string | No | 1h | 1h, 1d, 1w |
| limit | number | No | 168 | Number of points |
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/market/cvd?exchange=binance&symbol=BTCUSDT&interval=1h"Response
{
"exchange": "binance",
"symbol": "BTC/USDT",
"marketType": "SPOT",
"timeframe": "1h",
"data": [{ "timestamp": "2026-02-05T00:00:00.000Z", "basePrice": 65000.12, "cvd": { "all": 345.67 } }]
}On-chain API
MVRV, Realized Price, SOPR, NUPL, NRPL, Supply metrics, Dormancy, Address metrics, and more. All GET with X-API-KEY. See sidebar for full list; parameters follow the same pattern (e.g. period: 1day, 1week, 1month, 1year, all; variant where applicable).
Returns MVRV ratio time series. Period defaults to all.
Parameters
| Parameter | Type | Req | Default | Description |
|---|---|---|---|---|
| period | string | No | all | 1day, 1week, 1month, 1year, all |
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/onchain/mvrv?period=all"Response
{
"period": "all",
"result": [{ "datetime": "2026-02-05T00:00:00.000Z", "date": "2026-02-05", "value": 1.42, "mvrv": 1.42 }]
}Whale Tracking
Monitor large transactions from the Whale tracker. Paginate with page and pageSize.
Returns whale transfers for the given chain, filtered by minimum value. Supports pagination.
Parameters
| Parameter | Type | Req | Default | Description |
|---|---|---|---|---|
| chain | string | No | bitcoin | bitcoin, ethereum, etc. |
| minValue | number | No | 1000 | Minimum value filter |
| page | number | No | 1 | Page number |
| pageSize | number | No | 20 | Items per page |
Code example
curl -sSL -H "X-API-KEY: your_api_key_here" \
"https://api.foredex.io/external/v1/whale/transfers?chain=bitcoin&minValue=1000"Response
{
"transfers": [{ "txid": "abcd...1234", "blockTimestamp": "2026-02-05T12:34:56.000Z", "unitValue": "1200", "historicalUSD": "78000000", "chain": "bitcoin" }],
"total": 12345,
"page": 1,
"pageSize": 20
}Exchange API
Track asset flows and reserves across major centralized exchanges. Endpoints: /exchange/reserve, /exchange/flow, /exchange/whale-flow, /exchange/stablecoin-reserve. All GET.
Institutional API
Treasury holdings, MSTR bitcoin flow, ETF tickers, and Coinbase Prime OTC flow. Endpoints: /institutional/treasury, /institutional/mstr/bitcoin-flow, /institutional/etf-tickers, /institutional/coinbase-prime-otc. All GET.
Mining API
Mining reserve, hashrate, and cost. Endpoints: /mining/reserve, /mining/hashrate, /mining/cost (from/to required). All GET.
ETF API
Spot Bitcoin ETF net flow and holdings. /etf/netflow, /etf/holdings. All GET.
Cycle API
Pi Cycle Top, Rainbow Chart, RHODL ratio, Stock-to-flow. Endpoints: /cycle/pi-cycle, /cycle/rainbow-chart, /cycle/rhodl-ratio, /cycle/stock-to-flow. All GET.
Economic API
M2 Money Supply and economic calendar. /economic/m2, /economic/calendar. All GET.
Sentiment API
Crypto Fear & Greed Index. /sentiment/fear-greed. GET, no parameters.