# CryptoCapi > Crypto market intelligence with verifiable audit trails. > Every alpha insight (`view=alpha`) carries a SHA-256 protocol_hash. Radar seals > which checks discarded a line of its model and which fields Python set; Quant Plus > seals its inputs, so you can recompute the number yourself and check that it matches. CryptoCapi is a REST API that delivers quantitative crypto analysis through three engines of its own, plus Market Scan: - **Radar** — the math of the last closed day plus what the news sources report. The model only summarizes each news note in one line, checked against the note; Python writes the rest of the report, the sentiment included (a 4-layer anti-hallucination pipeline) - **Quant Plus** — z-score, regime classification, reproducible statistical insights - **Quant Pro** — on-demand confluence signals (EMA/RSI/MACD/Bollinger/Kalman) over the last closed candles, resolved across 1D and 4H - **Market Scan** — not an engine: a ranking layer over the Quant Plus signals. It ranks the curated Quant Plus universe by how far each asset moved on the last closed day, measured against its own anomaly threshold, and it is the only product that takes no asset id. Surveillance, not recommendations. Alpha insight responses (`view=alpha`) carry a verifiable `audit_trail` with a SHA-256 `protocol_hash`. Radar seals its process (`filters_applied`: the checks that discarded a line of the model; `fields_overridden`: the fields Python set, plus `analysis.detailed_report` when a discarded line left its note as a headline); Quant Plus seals its inputs (`data_source`, `input_vector`) so the caller can recompute the math independently. Scan and batch endpoints return ranked summaries without seals. ## Authentication Every engine and Market Scan endpoint requires a key, sent as `x-api-key: sk_live_...`. Without one it returns 401, with one exception: Radar's pulse view answers without a key, but only when `view=pulse` is in the URL (`GET /v1/market/insights/{coin_id}?view=pulse`). Leaving `view` out returns 401 even though pulse is the default view, and Quant Plus has no public view. Each product (the three engines and Market Scan) is sold separately (see the error codes below), so a key opens the products it includes and no others. Get a free 14-day trial (no credit card): https://cryptocapi.com Demo key (no signup): `demo_btc_eth_public` — bitcoin and ethereum only, on three routes: `/v1/market/insights/{bitcoin|ethereum}`, `POST /v1/quant/batch` with those two ids, and `/v1/quant/{BTCUSDT|ETHUSDT}/signal` (Quant Pro, served from a 5-minute cache). Any other coin or pair returns 403 `DEMO_COIN_RESTRICTED`, and a batch that includes one is rejected whole. The demo key always gets the alpha view, whatever `view` asks for. `/v1/quant/market-scan` (Market Scan) stays closed to it: 403 `PRODUCT_NOT_INCLUDED`. ## Native MCP server If your client speaks the Model Context Protocol, skip the REST calls: the same engines and Market Scan are exposed as four native tools by `@cryptocapi/mcp`, published on npm with build provenance: https://www.npmjs.com/package/@cryptocapi/mcp ```json { "mcpServers": { "cryptocapi": { "command": "npx", "args": ["-y", "@cryptocapi/mcp"], "env": { "CRYPTOCAPI_API_KEY": "demo_btc_eth_public" } } } } ``` That block is the format of Cursor (`.cursor/mcp.json` per project, `~/.cursor/mcp.json` for all of them), Windsurf and Claude Desktop. VS Code (GitHub Copilot) uses a different shape: the file is `.vscode/mcp.json`, the top-level key is `servers`, not `mcpServers`, and each server needs `"type": "stdio"`. ```json { "servers": { "cryptocapi": { "type": "stdio", "command": "npx", "args": ["-y", "@cryptocapi/mcp"], "env": { "CRYPTOCAPI_API_KEY": "demo_btc_eth_public" } } } } ``` Claude Code and Codex add it with one command. The option order differs: in Claude Code `--transport stdio` must sit between `--env` and the name, or the name is read as another variable, and without `--scope user` the server is added only to the project where you ran it; in Codex `--env` goes after the name. ```bash claude mcp add --env CRYPTOCAPI_API_KEY=demo_btc_eth_public --transport stdio cryptocapi -- npx -y @cryptocapi/mcp codex mcp add cryptocapi --env CRYPTOCAPI_API_KEY=demo_btc_eth_public -- npx -y @cryptocapi/mcp ``` ChatGPT cannot launch this server: its connectors only reach remote MCP servers over HTTPS, and this one runs locally over stdio. Tools: `get_insight`, `batch_signals`, `get_signal`, `scan_market`. All four serve CryptoCapi's own engines, or Market Scan's ranking over them. Prices and the market summary are NOT tools: they are third-party data (CoinGecko) and live in the REST endpoints listed below. CryptoCapi is not an aggregator, so the MCP surface carries only what its own engines produce. The `protocol_hash` is forwarded byte for byte, so a seal obtained through the MCP verifies against the REST response. Most clients read `mcp.json` only at startup: restart after editing. Source and manual test suite: https://github.com/Jegoba90/cryptocapi-mcp ## Errors: branch on `code`, not on the prose Every 403 that blocks an engine or Market Scan carries a machine-readable `code` flat in the body, next to `status` and `message`. Read it instead of matching on text: - `DEMO_COIN_RESTRICTED` — the public demo key outside bitcoin/ethereum. Retrying with another coin fails the same way. - `PRODUCT_NOT_INCLUDED` — the key never bought this product. `required_product` names the one it needs. Each product is sold separately, so holding one does not open the others. Retrying with the same key is pointless. - `PRODUCT_NOT_ACTIVE` — the key DID buy this product and the pass lapsed. The remedy is renewal, not purchase. Do not report this as "not included". None of these are argument errors, and none get better on a retry. ## Docs Full API reference: https://cryptocapi.com/docs/api How each engine works, including Radar's 4-layer anti-hallucination pipeline with a real sealed example: https://cryptocapi.com/methodology AI & agents guide: https://cryptocapi.com/docs/agentes Guide, signals for a trading bot (Spanish, Python): https://cryptocapi.com/guias/bot-de-trading. CryptoCapi does not execute orders: the bot sends them through its exchange's API. Guide, a trading assistant with Claude over MCP (Spanish): https://cryptocapi.com/guias/bot-de-trading-con-claude Recipes, ready-to-run use cases with an agent prompt and/or a standard-library Python script, each with a real dated output (Spanish): https://cryptocapi.com/recetas. Daily portfolio summary with seals (Radar), signal or regime change alert (Quant Plus batch), portfolio risk board (Quant Plus batch), a Binance pair in two timeframes with the closed candles it read (Quant Pro), verify a Quant Plus signal yourself (recompute the z-score and the seal), and check that a day of the signal history is anchored to Bitcoin (no key). Every page has a markdown mirror: append `.md`. OpenAPI document (JSON, this is the one to parse): https://api.cryptocapi.com/v1/openapi.json OpenAPI browser (Swagger UI, HTML for humans): https://api.cryptocapi.com/v1/docs ## Machine-readable surface **Append `.md` to a page URL to get that page as markdown.** `/docs/api` becomes `/docs/api.md`; the home is `/.md`. Each one is generated from the page itself on every deploy, so it says exactly what the page says, minus the layout. **Branch on the `Content-Type`, not on the status code.** A `.md` URL for a page without a mirror returns **200 with the HTML shell**, not 404, because the SPA rewrite catches it. `text/markdown` means the mirror exists. `text/html` means it does not. This is the only reliable check. **Do not guess which pages have one.** Every HTML response carries a `Link` header announcing two catalogs, and the second lists every mirror by URL: - https://www.cryptocapi.com/.well-known/api-catalog — RFC 9727 linkset: the OpenAPI document, the HTML reference, and the health endpoint. - https://www.cryptocapi.com/.well-known/ai-catalog.json — every machine-readable resource: this file, the OpenAPI, health, the anchored signal history, the MCP package and source, and one entry per markdown mirror. **Market data has no page and no markdown mirror, on purpose.** Prices and the market summary are live third-party data, not documents; they are served by the endpoints below, which is where that data belongs. Their absence is a decision, not a gap. ## Endpoints ### Engines and Market Scan (key required, each sold separately) - `GET /v1/market/insights/{coin_id}?view=alpha` — Radar insight with full audit_trail. `coin_id` is a CoinGecko-style id (`bitcoin`, `ethereum`, `solana`). - `GET /v1/quant/market-scan?limit=10` — The curated Quant Plus universe, ranked by `threshold_proximity`: `|z_score|` of the last closed day over the asset's own anomaly threshold (1.0 or more = that day was an anomaly). It is not a path toward a signal: the next day's z is measured afresh. `limit`: 1-50. `strategy` (`balanced` default, `aggressive`, `conservative`) is accepted, but today all three return the SAME order: every series has its full 50-return sample, so `evidence_weight` is 1 everywhere and the threshold is the same for every asset (so the order equals the order by `|z_score|`). They would only differ by sinking an asset with an incomplete sample. No strategy filters: filter client-side by `signal`, `threshold_proximity` or `market_regime`. Each row carries `last_close_date` (the UTC day its numbers read; `generated_at` is when it was computed), the `protocol_hash` and `engine_version` of the Quant Plus reading it ranks, and `market_cap_rank` (with the coin id, the final tiebreak). `current_price` and `price_change_percentage_24h` are live. `data.universe_count` is how many assets passed the filters before `limit`; `count` is how many came back. Stablecoins enter only with their peg broken (`PEG_BROKEN`, last close 0.5 % or more from the dollar), and their `threshold_proximity` is that distance over 0.5 %. - `GET /v1/quant/{symbol}/signal` — Quant Pro signal, computed on request over the last closed candles. `symbol` is a trading pair (`BTCUSDT`), NOT a coin id. `resolved_signal` says how many trend and momentum indicators agree (STRONG_BUY >= 85, BUY 65-84, NEUTRAL_CHOP 35-64, SELL 16-34, STRONG_SELL < 16): a confluence reading, not a probability or a forecast. Each timeframe names the closed candles it read (`candles_from`, `candles_to`), and they are sealed. - `POST /v1/quant/batch` — Latest Quant Plus signals for up to 50 assets in one request. Body: `{"symbols": ["bitcoin", "ethereum"]}` — coin ids here, NOT trading pairs. Each row carries `last_close_date` (the UTC day it reads), `protocol_hash` and `engine_version`; `generated_at` is when it was computed, not the day. ### Market Data (Public, no key required) - `GET /v1/market/prices/latest` — Current prices, ranked by market cap. Returns **50 by default, not the whole universe**: pass `limit` (max 250) to get every tracked asset. Counting the default page and reporting it as our coverage is wrong by more than half. - `GET /v1/market/market-summary` — Fear & Greed index + BTC dominance ## Verifiable signal history Every signal Radar and Quant Plus publish goes into an append-only history (Quant Pro computes on request and is not recorded), and each UTC day of it is anchored to Bitcoin with OpenTimestamps. Three public endpoints, no key and CORS open, let anyone check it without asking us: - `GET /v1/history/anchors` — every anchored day, oldest first, pending ones included: `day`, `status` (`pending` | `confirmed`), `row_count`, `min_id`, `max_id`, `id_order`, `manifest_sha256`, `bitcoin_block`, `stamped_at`, `confirmed_at`, `manifest_url`, `ots_url`. - `GET /v1/history/anchors/{day}/manifest` — that day's manifest, byte for byte (`text/plain`): the header `cryptocapi-signal-ledger v1 day=YYYY-MM-DD rows=N`, then one `id leaf` line per receipt. The leaf is the SHA-256 of the receipt row in canonical JSON (RFC 8785). - `GET /v1/history/anchors/{day}/ots` — the OpenTimestamps proof of that manifest. To verify a day, download both files and drop them on https://opentimestamps.org: the `.ots` first, then the manifest when it asks. Dropping the manifest first stamps it again instead of verifying it. The page names the Bitcoin block, which must be `bitcoin_block`, and the SHA-256 of the manifest must be `manifest_sha256`. Read it right: - **It proves when, not whether.** A confirmed day proves those receipts existed, unchanged, by that block's date. It says nothing about whether a signal was right. - **The proven date is the block's, not the day's.** Days up to 2026-10-11 were anchored late, in one batch, when anchoring went live (2026-10-13, 00:04 UTC; 2026-10-05 later that day), so their block is later than the day. - **No signals or receipts are served here**, only receipt ids and hashes. - **2026-09-30 is the one exception** (`id_order: "text"`): its lines are in id order as text (1, 10, 100, ..., 99), so its `max_id` is 99, not the day's highest id. The proof still holds, because a receipt is found by its id. - `400 INVALID_DAY`: `{day}` is not a real YYYY-MM-DD date. `404 ANCHOR_NOT_FOUND`: that day is not anchored; day D is anchored after 01:00 UTC of D+1. ## Response shape (insight, view=alpha) ```json { "status": "success", "version": "1.0.0", "timestamp": "2026-07-02T14:32:07.000Z", "data": { "engine_used": "radar", "asset": { "id": "bitcoin", "symbol": "BTC" }, "generated_at": "2026-07-02T14:32:07.000Z", "summary": "Lateralización en bandas normales, con leve presión bajista.", "sentiment": "bearish", "statistical_anomaly_detected": false, "confidence": { "score": 0.64, "label": "MEDIUM" }, "math_diagnostics": { "z_score": -0.637, "z_score_threshold": 3.5051, "bollinger_bandwidth": 0.042, "market_regime": "RANGING_CHOP", "extreme_volatility_detected": false, "data_quality": "OPTIMAL", "data_quality_reason": [], "sentiment_override": false, "anomaly_details": null, "regime_thresholds": { "volatility_hard_limit": 0.05, "z_score_anomaly_boundary": 3.5051, "daily_change_trend_boundary": 0.02 }, "band_position": "CERCA_BANDA_INFERIOR", "volatility_momentum": "EXPANDING", "bollinger_bandwidth_delta_pct": 7.23, "last_close_date": "2026-07-01", "audit_trail": { "protocol_hash": "0x8ac8aee2cc176fcfaefb6890b4c3e6af...", "calculated_at": "2026-07-02T14:30:00.516360Z", "seal_type": "process_seal", "algorithm_id": "Radar 4-Layer Anti-Hallucination Pipeline", "engine_version": "v3.1.0-radar", "filters_applied": [], "fields_overridden": ["analysis.anomaly_details", "analysis.confidence", "analysis.sentiment_score", "confidence", "is_volatility_alert"], "sentiment_override": false } }, "analysis": { "detailed_report": "Último día cerrado: 1 de julio de 2026 (UTC). El día cerró con una variación de ... Fuentes analizadas (últimas 48 h): CoinDesk informa que ...", "sources_verified": [ { "title": "...", "url": "https://...", "credibility": "Tier 1" } ], "sources_window": "48h" } } } ``` Notes: - **How Radar writes `detailed_report` (since `v3.0.0-radar`).** Python writes it: first the math of the last closed day, then "Fuentes analizadas (últimas 48 h):" with one sentence per news note, " informa que ..." when the model's line passed the check against its note (every figure and proper name in the note, no forecast, no cause, no price), or " titula: «»" when it did not. With no notes it says the analyzed sources register none, scoped to what Radar read. Each note is in `sources_verified` with its URL, so any line can be read against its source. `sentiment` comes from the z-score in every zone, never from the model, so `sentiment_override` is always `false` on Radar. - **`z_score` and Bollinger measure different axes. Do not read them as one.** `z_score` compares THE LAST CLOSED DAY'S MOVE (UTC), not the day in progress, against the distribution of past moves (50 logarithmic returns). Bollinger band position compares the PRICE LEVEL against its own range. A price sitting in the upper third of its bands with a z_score of -2 is not a contradiction: the level is still high after a day that closed with an unusually negative move. Reporting that as "limited upward pressure" alongside a bearish reading is a misreading of the two fields, not a conflict in the data. - `market_regime` reads that same last closed day: its z, its change and whether its close broke the bands. It can be rebuilt from the Quant Plus `audit_trail`. Despite their names, `BULLISH_TREND` and `BEARISH_TREND` describe that one day (it moved past 2 % or closed outside its bands), not a trend over several days: do not call them an uptrend or a downtrend. - **`last_close_date` is the UTC day every number in `math_diagnostics` reads.** Two readings on the same UTC day read the same close and carry the same numbers; they change with the first reading after 00:00 UTC. Identical numbers hours apart are expected, not stale data. - **Check the report against `band_position` and `volatility_momentum`.** They are what the report may say about the bands: where the last close sits (`band_position`, the price level) and whether the bands open or close (`volatility_momentum`: `EXPANDING` or `COMPRESSING` past a 5 % change in width against the previous close, given in `bollinger_bandwidth_delta_pct`; `STABLE` in between). A report that calls the range narrow while the state is `EXPANDING` contradicts the engine. These four fields sit outside the seal, and readings stored before they were published do not carry them. - Stablecoins (USDT, USDC, DAI, FDUSD, USDe) are read by the distance of their last close to the dollar, not by `z_score`: Quant Plus gives them `NO_ANOMALY`, or `PEG_BROKEN` from 0.5 % away. Never `ANOMALY_UP` or `ANOMALY_DOWN`. - **Quant Plus `actionable_insight.signal` names what was measured, not a trade** (since `v2.7.0-math`): `ANOMALY_UP` or `ANOMALY_DOWN` when the last closed day crossed its anomaly threshold, `PEG_BROKEN` for a stablecoin 0.5 % or more off the dollar, `NO_ANOMALY` otherwise. Do not read it as buy or sell. Over 5 years and 17 coins, counting each day once, three days after an `ANOMALY_UP` the median move was -1.64 % (up 40 % of the time), and after an `ANOMALY_DOWN` +1.43 % (up 66 %); at seven days it was indistinguishable from any other day. That is what happened, not a forecast. Until `v2.6.0-math` the values were `BUY_WATCH`, `SELL_WATCH`, `ALERT` and `HOLD`; a reading stored before the change can still carry them until it is purged, 7 days later. - `audit_trail` lives inside `math_diagnostics`, not at the top of `data`. - **Read `generated_at`, not `timestamp`, to know how old an analysis is.** `generated_at` sits in `data` and always means the same thing: when the engine computed that analysis. The envelope `timestamp` does NOT: on this route it mirrors `generated_at`, but on `/quant/*` it is the time the response was built, because a scan or a batch mixes rows from different moments and no single date represents them. Both are correct on their own route, and that is exactly why the field name is not comparable across routes. `generated_at` is. - On the MCP path, every error that carries a machine-readable `code` ends with a final line `code: `. Branch on that line, not on the prose above it. - `confidence` is an object (`score` + `label`), not a string. - `data_quality` is one of `OPTIMAL` | `PARTIAL` | `INSUFFICIENT`. - Quant Plus insights (`?engine=quant_plus`) use `seal_type: "reproducible"` (with `data_source`, `input_timestamps`, `input_vector`) instead of `process_seal`. - With no key, `view=pulse` written in the URL answers 200 (Radar only). Without `view`, or with `view=alpha`, it returns 401: the key check reads the query parameter, not the default. With a key on the free plan, `view=alpha` returns 403 and `view=pulse` (also the default here) answers without `confidence`, `math_diagnostics` and `analysis`. The demo key always gets alpha. - **`data` can be `null`, and that is a valid answer.** When no engine has produced an analysis for a coin, the response is `{"status":"success","data":null}` — for any coin, majors included. It is not an error, not a rate limit and not a malformed body: it is the API saying it has nothing to say yet. Report it as "no analysis available", never as a failure, and never fill the gap yourself. Until 2026-08-29 the five largest coins got a hand-written filler sentence instead of `null`; it was removed because it travelled signed with the engine's name and no engine had computed it. An engine that stays silent is the point of the product, not a defect. ## Latency Not all engines are pre-computed. Set client timeouts accordingly. | Endpoint | Execution | Typical latency | |----------|-----------|-----------------| | `GET /v1/market/insights/{coin_id}` (Radar) | Pre-computed by scheduler | <100 ms (DB read) | | `GET /v1/market/insights/{coin_id}?engine=quant_plus` | Pre-computed by scheduler | <100 ms (DB read) | | `GET /v1/quant/market-scan` | Reads pre-computed Quant Plus signals | <100 ms (DB read) | | `POST /v1/quant/batch` | Reads pre-computed Quant Plus signals | <100 ms (DB read) | | `GET /v1/quant/{symbol}/signal` (Quant Pro) | On-demand, computed inside the request | ~2-3 s | Quant Pro fetches live Binance data and runs the full math pipeline (Kalman + dual-timeframe confluence) during the request. Use a client timeout of at least 15 s: the server aborts the engine call at 15 s and returns an error asking you to retry. ## Rate limits Two windows apply at once: an hourly quota and a burst ceiling measured over a rolling 2-second window. | Plan | Requests/hour | Burst (per 2 s) | |------|--------------|-----------------| | Demo (`demo_btc_eth_public`) | 30 | 5 | | Free, and any expired key | 1,000 | 20 | | PRO | 10,000 | 20 | **The middle row is the one that surprises integrators.** When the 14-day trial ends, the key is not blocked: it degrades to the free tier, so the hourly quota drops from 10,000 to 1,000 without the credential changing. Code that sized its polling against 10,000 starts collecting 429s on a key that still authenticates.