ForeDex Docsforedex.io

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/v1

Use this URL for all API calls. This is the backend; do not serve the docs from this host.

Status

Operational

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.

cURLbash
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:

MODELjson
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

cURLbash
curl -sSL -H "X-API-KEY: your_api_key_here" \
  "https://api.foredex.io/external/v1/info/symbols"

Response

JSONjson
{
  "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

cURLbash
curl -sSL -H "X-API-KEY: your_api_key_here" \
  "https://api.foredex.io/external/v1/info/periods"

Response

JSONjson
{
  "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

ParameterTypeReqDefaultDescription
assetstringNoBTCBTC or ETH
exchangestringNoall_exchangesExchange or all_exchanges
timeframestringNo1WTimeframe
intervalstringNo1d1d, 1w, etc.
marketTypestringNoFUTURESFUTURES or PERP

Code example

cURLbash
curl -sSL -H "X-API-KEY: your_api_key_here" \
  "https://api.foredex.io/external/v1/market/oi?asset=BTC&interval=1d"

Response

JSONjson
{
  "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

ParameterTypeReqDefaultDescription
assetstringNoBTCBTC or ETH
exchangestringNoall_exchangesExchange or all_exchanges
timeframestringNo1WTimeframe
intervalstringNo1d1d, 1w
marketTypestringNoFUTURESFUTURES or PERP

Code example

cURLbash
curl -sSL -H "X-API-KEY: your_api_key_here" \
  "https://api.foredex.io/external/v1/market/funding-rate?asset=BTC"

Response

JSONjson
{
  "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

ParameterTypeReqDefaultDescription
exchangestringNobinancebinance, okx, bybit
symbolstringNoBTCUSDTTrading pair
marketTypestringNoSPOTSPOT or FUTURES
intervalstringNo1h1h, 1d, 1w
limitnumberNo168Number of points

Code example

cURLbash
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

JSONjson
{
  "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

ParameterTypeReqDefaultDescription
periodstringNoall1day, 1week, 1month, 1year, all

Code example

cURLbash
curl -sSL -H "X-API-KEY: your_api_key_here" \
  "https://api.foredex.io/external/v1/onchain/mvrv?period=all"

Response

JSONjson
{
  "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

ParameterTypeReqDefaultDescription
chainstringNobitcoinbitcoin, ethereum, etc.
minValuenumberNo1000Minimum value filter
pagenumberNo1Page number
pageSizenumberNo20Items per page

Code example

cURLbash
curl -sSL -H "X-API-KEY: your_api_key_here" \
  "https://api.foredex.io/external/v1/whale/transfers?chain=bitcoin&minValue=1000"

Response

JSONjson
{
  "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.