Skip to main content
Loading market data…
Reference

API reference

Every public REST endpoint in one place — 118 endpoints across 14 categories, with real curl examples, response shapes, and the tier required to call them. Everything here is stable; breaking changes get a /v2 path.

Quick start

The fastest path to a working request. No account needed — the fear & greed index is anonymous-tier. If this returns 200, everything else below will work once you have a key.

Requestbash
curl -sS "https://api.example.com/api/v1/sentiment/fear-greed?limit=5"
Responsejson
{
  "data": {
    "latest": {
      "ts": 1744761600000,
      "value": 62,
      "classification": "Greed"
    },
    "history": [
      { "ts": 1744243200000, "value": 54, "classification": "Neutral" },
      { "ts": 1744329600000, "value": 58, "classification": "Greed" }
    ]
  },
  "meta": { "total": 2, "limit": 5 }
}

For AI agents

If you are an LLM, an autonomous agent, or a human building one: these artefacts are the machine-readable version of this page. Same source of truth, no drift.

OpenAPI 3.1 spec

Every endpoint, every parameter, with examples and auth metadata. Drop into Postman, Insomnia, Stoplight, or any OpenAPI toolchain.

/openapi.json

llms.txt + llms-full.txt

LLM-ingestible discovery files following the llmstxt.org spec. The short file is an overview; the full file is every endpoint inlined for one-fetch ingestion.

MCP server (coming soon)

Model Context Protocol server exposes every REST endpoint as a native tool for Claude Desktop, Cursor, Windsurf, Cline. Register interest on the MCP page.

/docs/mcp

ChatGPT plugin manifest

Legacy plugin spec still walked by several agent frameworks; points at the same OpenAPI + llms.txt files.

/.well-known/ai-plugin.json

Authentication

Anonymous-tier endpoints (fear & greed, status, symbols) are open. For every other endpoint you pass a bearer token on each request. Keys are prefixed cg_live_ — GitHub's secret scanner recognises this format and will warn you if you commit one.

1. Create a key

Head to API keys in your dashboard. The plaintext is shown once at creation — save it somewhere durable; we only ever store the hash.

2. Send it as Bearer

Every request includes the key in an Authorization header. Query-string auth is deliberately not supported — keeps keys out of server logs.

Authenticated requestbash
curl -sS "https://api.example.com/api/v1/liquidations?coin=BTC&limit=10" \
  -H "Authorization: Bearer cg_live_YOUR_KEY"

Rate limit headers

Every response carries live rate-limit counters — no need to track them client-side. Read X-RateLimit-Remaining before sending your next batch; back off when it approaches zero. On a 429 the server also sets Retry-After with the seconds until the window resets.

Response headersbash
HTTP/1.1 200 OK
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 294
X-RateLimit-Reset: 48
Retry-After: 48   (sent only on 429 responses)

Tier limits

The requests-per-minute budget for every tier. Full feature matrix and pricing lives on the pricing page.

TierRequests per minuteWindowPositioning
Anonymous1060sNo key. Open endpoints for tire-kicking and public dashboards.
Hobbyist3060sLogged-in free tier. Enough for side projects and learning.
Startup8060sSmall teams and solo quant devs building weekend bots.
Standard30060sProp desks and production dashboards. The canonical tier.
Professional1,20060sFunds and institutions — priority support, full history.
Enterprise10,00060sCustom SLA, dedicated infra, WebSocket priority lane.

Endpoints

118 endpoints, grouped by domain. Click any row for the full reference — parameters, response shape, curl example, and tier.

Futures

Derivatives data across all major CEXs — liquidations, open interest, funding, long/short ratios.

GET
/api/v1/liquidations

Recent forced-close events across every derivatives exchange we ingest.

GET
/api/v1/open-interest

Cross-exchange open interest — totals, top coins, or per-coin time series.

GET
/api/v1/funding-rates

Current funding matrix across every exchange, or per-coin history for carry-strategy backtests.

GET
/api/v1/long-short

Aggregate and elite-trader long/short positioning ratios — the classic contrarian feed.

GET
/api/v1/futures/funding/history

Per-coin funding rate history in 8-hour buckets, cross-exchange average.

GET
/api/v1/futures/funding/heatmap

Cross-exchange funding matrix (coins × exchanges) + current extremes.

GET
/api/v1/futures/funding/weighted

OI-weighted funding rate per coin — the honest carry number.

GET
/api/v1/futures/oi/history

Per-coin OI history — aggregate + per-exchange split in 5-minute buckets.

GET
/api/v1/futures/oi/by-exchange

Cross-exchange OI pivot — per-venue sum, share, instrument count.

GET
/api/v1/futures/oi/dominance

Coin-level OI dominance — share of aggregate OI per coin.

GET
/api/v1/futures/volume

Per-coin 24h futures notional (perp + dated futures).

GET
/api/v1/futures/premium-index

Latest mark-vs-index premium snapshot across every connected perp venue.

GET
/api/v1/futures/premium-index/history

Per-coin cross-exchange average premium %, bucketed to 5-minute floors.

GET
/api/v1/futures/basis

Latest annualised perp-vs-spot basis per base asset. Cash-and-carry telemetry.

GET
/api/v1/futures/taker-volume

Taker buy vs sell volume per coin over a trailing window.

GET
/api/v1/futures/taker-volume/{base}

Per-coin taker buy/sell split for a single base asset.

GET
/api/v1/futures/largest-liquidations

Top-N single liquidation events by USD notional over a trailing window, filterable.

Markets

Market-wide overviews — totals, gainers, losers, most-traded; the macro-lens over the coin universe.

Options

Deribit options chain, Greeks, put/call ratio, max-pain by underlying.

GET
/api/v1/options/{underlying}

Deribit options chain, Greeks, put/call ratio, and max-pain strike for BTC or ETH.

GET
/api/v1/options/{underlying}/chain

Latest Deribit chain snapshot — optionally narrowed to one expiry.

GET
/api/v1/options/{underlying}/iv

Per-strike IV at the latest snapshot for a single expiry.

GET
/api/v1/options/{underlying}/iv/history

IV history for a single (expiry, strike) tuple — ATM by default.

GET
/api/v1/options/{underlying}/iv/surface

Full IV surface — strikes × expiries with per-cell IV.

GET
/api/v1/options/{underlying}/iv-rank

IV RANK — where today's ATM IV sits in its rolling N-day range.

GET
/api/v1/options/{underlying}/dvol

Deribit Volatility Index (DVOL) — current + history.

GET
/api/v1/options/{underlying}/greeks

Greeks snapshot — every strike in the latest chain.

GET
/api/v1/options/{underlying}/max-pain

Max-pain strike per expiry for the N next upcoming expiries.

GET
/api/v1/options/{underlying}/max-pain/history

Historical max-pain strike — nearest expiry or per-expiry flavours.

GET
/api/v1/options/{underlying}/pcr

Put/Call ratio snapshot — underlying total + per-expiry breakdown.

GET
/api/v1/options/{underlying}/pcr/history

Put/Call ratio history — OI PCR + volume PCR over N days.

GET
/api/v1/options/{underlying}/by-strike

Strike-level aggregates: OI + volume + avg IV per strike.

GET
/api/v1/options/{underlying}/by-expiry

Expiry-level aggregates — term structure of OI, volume, max pain.

GET
/api/v1/options/{underlying}/oi

Aggregate open interest — totals + per-exchange breakdown.

GET
/api/v1/options/{underlying}/volume

Aggregate 24h volume — totals + per-strike breakdown.

GET
/api/v1/options/{underlying}/expiries

Distinct expiry list at the latest snapshot with strike counts.

GET
/api/v1/options/{underlying}/term-structure

ATM implied volatility per expiry — the term-structure curve.

Response envelope

Every response — success or error, single or list — uses the same shape. Key off the HTTP status for coarse routing, then on body.error.code for fine-grained handling.

Envelope typetypescript
interface ApiEnvelope<T> {
  data: T | null;             // the payload (null on error)
  meta?: {                    // optional, present on list endpoints
    total?: number;
    limit?: number;
    offset?: number;
    [key: string]: unknown;   // per-endpoint extras (e.g. "window", "days")
  };
  error?: {                   // present on 4xx / 5xx only
    code: string;             // machine-readable — see Error codes below
    message: string;          // human message (safe to show users)
  };
}
Success (200)json
{
  "data": [ /* rows */ ],
  "meta": { "total": 42, "limit": 100, "offset": 0 }
}
Error (4xx/5xx)json
{
  "data": null,
  "error": {
    "code": "BAD_PARAM",
    "message": "Invalid 'coin' symbol."
  }
}

Error codes

Every failure returns a stable error.code. Switch on these in your client — the message field is for humans and may change between releases.

CodeHTTPWhen it happensWhat to do
BAD_PARAM400A query or path parameter failed validation (bad symbol, unknown enum, malformed expiry, etc.).Re-check the endpoint's parameter table. Each parameter documents its allowed values and defaults.
UNKNOWN_UNDERLYING404The `:underlying` path segment on the options endpoint wasn't BTC or ETH.Use `/api/v1/options/BTC` or `/api/v1/options/ETH`.
UNKNOWN_ASSET404The `:asset` path segment on the on-chain endpoint didn't match the expected short alphabetic form (2–8 letters).Use uppercase codes like `BTC`, `ETH`, `SOL`. Avoid tickers with slashes, numbers, or punctuation.
RATE_LIMITED429You exceeded your tier's requests-per-minute budget. Headers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` tell you where you are.Back off until `X-RateLimit-Reset` seconds have elapsed, or upgrade tier. Honour the `Retry-After` header when present.
DB_ERROR500The database layer failed (libsql / SQLite unavailable, migration mid-flight, etc.). Message is deliberately opaque — server logs carry detail.Retry with exponential backoff. If this persists, check `/api/v1/status` — a stalled adapter often precedes a DB issue.
INTERNAL_ERROR500An unexpected error — the catch-all for anything the route didn't classify itself.Retry once; open a support ticket if it keeps happening with the same request shape.