{"openapi":"3.0.0","paths":{"/v1/flows/summary":{"get":{"description":"Returns the most recent available net ETF flow (USD millions) for every tracked asset — BTC, ETH, SOL, XRP, HYP plus DOGE, LINK, AVAX, HBAR, LTC, BNB, DOT and SUI. Use it for a one-shot dashboard snapshot. For a time series of a single asset use `/flows/{asset}`.","operationId":"summary","parameters":[],"responses":{"200":{"description":"Latest net flow per asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsSummaryDto"}}}}},"security":[{"ApiKey":[]}],"summary":"Latest-day net flows for all assets","tags":["Flows"]}},"/v1/flows/{asset}":{"get":{"description":"Returns the daily net ETF flow time series for a single asset, ordered oldest → newest. History depth depends on your key (see `windowDays`; free tier = 30 days).","operationId":"byAsset","parameters":[{"name":"asset","required":true,"in":"path","description":"Asset to fetch: btc, eth, sol, xrp, hyp (aggregator data) or doge, link, avax, hbar, ltc, bnb, dot, sui (computed by us from issuer filings).","schema":{"enum":["btc","eth","sol","xrp","hyp","doge","link","avax","hbar","ltc","bnb","dot","sui"],"type":"string"}}],"responses":{"200":{"description":"Daily net flows for the asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetFlowsDto"}}}}},"security":[{"ApiKey":[]}],"summary":"Daily net-flow history for one asset","tags":["Flows"]}},"/v1/index/cefi":{"get":{"description":"Returns the composite Crypto ETF Flow Sentiment index (CEFI) across all tracked assets — the current value plus recent history (baseline = 100). This is the only CEFI index: there are no per-asset variants. History depth depends on your key (free tier = 30 days).","operationId":"composite","parameters":[],"responses":{"200":{"description":"Composite CEFI index with history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CefiIndexDto"}}}}},"security":[{"ApiKey":[]}],"summary":"Composite CEFI sentiment index","tags":["Index"]}},"/v1/tickers":{"get":{"description":"Returns the directory of tracked assets — symbol, internal id and name. Use the `asset` value as the `{asset}` path parameter on other endpoints.","operationId":"list","parameters":[],"responses":{"200":{"description":"Tracked assets directory.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TickerDto"}}}}}},"security":[{"ApiKey":[]}],"summary":"List tracked assets","tags":["Tickers"]}},"/v1/prices":{"get":{"description":"Returns the latest spot price (USD) and 24-hour change for every tracked asset. Prices are sourced from major exchanges and cached briefly.","operationId":"list","parameters":[],"responses":{"200":{"description":"Current spot prices per asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricesDto"}}}}},"security":[{"ApiKey":[]}],"summary":"Current spot prices","tags":["Prices"]}},"/v1/analytics/weekly":{"get":{"description":"Returns aggregated flow analytics over the last 7 days for every asset: total net flow, average daily flow, and the count of positive vs negative days. Useful for a quick momentum read without pulling the full series.","operationId":"weekly","parameters":[],"responses":{"200":{"description":"7-day aggregated analytics per asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyAnalyticsDto"}}}}},"security":[{"ApiKey":[]}],"summary":"Weekly flow analytics","tags":["Analytics"]}}},"info":{"title":"CryptoETF Public API","description":"Free public API for spot crypto ETF data: daily fund flows, the CEFI sentiment index, tracked tickers, live prices and weekly analytics.\n\n### Quick start\n\n```bash\ncurl -H \"Authorization: Bearer $CRYPTOETF_KEY\" \\\n  https://api.cryptoetf.today/api/v1/flows/summary\n```\n\n### Authentication\n\nEvery request requires an API key. Register at https://cryptoetf.today, copy the key from your profile and send it as `Authorization: Bearer <key>`. Requests without a valid key return `401`.\n\n### Rate limits\n\nLimits are applied per key and reported via `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers; exceeding them returns `429`.\n\n### Data depth\n\nThe free tier returns the most recent **30 days** of history — for every asset, including the ones we compute ourselves. Anything deeper (full history, per-fund breakdowns, extended analytics) is not served here; contact us instead.\n\n### Tracked assets\n\nTwo groups, one response shape:\n\n| Group | Assets | Source |\n| --- | --- | --- |\n| Aggregated | `btc`, `eth`, `sol`, `xrp`, `hyp` | Daily issuer disclosures via aggregators |\n| Computed by us | `doge`, `link`, `avax`, `hbar`, `ltc`, `bnb`, `dot`, `sui` | Read straight from each issuer: change in shares outstanding × that day's NAV |\n\nNo aggregator publishes flows for the second group, so those numbers are ours. The CEFI sentiment index is a single composite at `/v1/index/cefi` and covers every tracked asset — there are no per-asset indices.\n\n### MCP server (for AI assistants)\n\nThe same data is exposed over the Model Context Protocol, so Claude, Cursor or any MCP client can query it directly:\n\n```json\n{\n  \"mcpServers\": {\n    \"cryptoetf\": {\n      \"url\": \"https://api.cryptoetf.today/api/mcp\",\n      \"headers\": { \"Authorization\": \"Bearer <your-key>\" }\n    }\n  }\n}\n```\n\nTools: `get_flows_summary`, `get_asset_flows`, `get_cefi_index`, `get_prices`, `get_weekly_analytics`. Same key, same 30-day window.\n\n### Conventions\n\nAll dates are UTC (`YYYY-MM-DD`). Flow values are net flows in millions of USD: positive = inflow, negative = outflow. Days with no trading simply have no row.","version":"1.0","contact":{}},"tags":[{"name":"Flows","description":"Daily net spot-ETF flows per asset (USD millions)"},{"name":"Index","description":"CEFI — Crypto ETF Flow Sentiment index"},{"name":"Tickers","description":"Directory of tracked assets"},{"name":"Prices","description":"Current spot prices of tracked assets"},{"name":"Analytics","description":"Aggregated flow analytics"}],"servers":[{"url":"https://api.cryptoetf.today/api","description":"API Server"}],"components":{"securitySchemes":{"ApiKey":{"scheme":"bearer","bearerFormat":"API key","type":"http"}},"schemas":{"FlowsSummaryItemDto":{"type":"object","properties":{"symbol":{"type":"string","example":"BTC","description":"Asset ticker symbol."},"asset":{"type":"string","example":"bitcoin","description":"Internal asset id."},"date":{"type":"object","example":"2026-06-16","nullable":true,"description":"Date of the latest available data point (UTC), or null if none."},"netFlowUsdM":{"type":"number","example":245.7,"description":"Latest-day net flow in millions of USD (positive = inflow)."}},"required":["symbol","asset","date","netFlowUsdM"]},"FlowsSummaryDto":{"type":"object","properties":{"assets":{"description":"One entry per tracked asset.","type":"array","items":{"$ref":"#/components/schemas/FlowsSummaryItemDto"}},"updatedAt":{"type":"string","example":"2026-06-16T07:50:00.000Z","description":"Response generation time (UTC, ISO 8601)."}},"required":["assets","updatedAt"]},"FlowPointDto":{"type":"object","properties":{"date":{"type":"string","example":"2026-06-16","description":"Trading day in UTC (YYYY-MM-DD)."},"netFlowUsdM":{"type":"number","example":245.7,"description":"Net ETF flow for the day in millions of USD. Positive = net inflow, negative = net outflow."}},"required":["date","netFlowUsdM"]},"AssetFlowsDto":{"type":"object","properties":{"symbol":{"type":"string","example":"BTC","description":"Asset ticker symbol."},"asset":{"type":"string","example":"bitcoin","description":"Internal asset id used in the path."},"windowDays":{"type":"number","example":30,"description":"How many days of history this key is allowed to read (free tier = 30)."},"days":{"description":"Daily net flows, ordered oldest → newest.","type":"array","items":{"$ref":"#/components/schemas/FlowPointDto"}},"updatedAt":{"type":"string","example":"2026-06-16T07:50:00.000Z","description":"Response generation time (UTC, ISO 8601)."}},"required":["symbol","asset","windowDays","days","updatedAt"]},"IndexPointDto":{"type":"object","properties":{"date":{"type":"string","example":"2026-06-16","description":"Date (UTC, YYYY-MM-DD)."},"value":{"type":"number","example":112.4,"description":"CEFI index value for that date (baseline = 100)."}},"required":["date","value"]},"CefiIndexDto":{"type":"object","properties":{"index":{"type":"string","example":"CEFI-Composite","description":"Index name."},"current":{"type":"number","example":112.4,"description":"Current (latest) index value."},"date":{"type":"string","example":"2026-06-16","description":"Date of the current value (UTC)."},"windowDays":{"type":"number","example":30,"description":"Days of history returned for this key (free tier = 30)."},"history":{"description":"Index history, ordered oldest → newest.","type":"array","items":{"$ref":"#/components/schemas/IndexPointDto"}}},"required":["index","current","date","windowDays","history"]},"TickerDto":{"type":"object","properties":{"symbol":{"type":"string","example":"BTC","description":"Ticker symbol."},"asset":{"type":"string","example":"bitcoin","description":"Internal asset id (use as the {asset} path param)."},"name":{"type":"string","example":"Bitcoin","description":"Human-readable asset name."}},"required":["symbol","asset","name"]},"PriceDto":{"type":"object","properties":{"symbol":{"type":"string","example":"BTC","description":"Ticker symbol."},"priceUsd":{"type":"number","example":67432.1,"description":"Current spot price in USD."},"change24hPct":{"type":"number","example":1.83,"description":"24-hour price change, percent."}},"required":["symbol","priceUsd","change24hPct"]},"PricesDto":{"type":"object","properties":{"prices":{"description":"One entry per tracked asset.","type":"array","items":{"$ref":"#/components/schemas/PriceDto"}},"updatedAt":{"type":"string","example":"2026-06-16T07:50:00.000Z","description":"Price snapshot time (UTC, ISO 8601)."}},"required":["prices","updatedAt"]},"WeeklyAssetDto":{"type":"object","properties":{"symbol":{"type":"string","example":"BTC","description":"Ticker symbol."},"asset":{"type":"string","example":"bitcoin","description":"Internal asset id."},"netFlowUsdM":{"type":"number","example":1203.4,"description":"Total net flow over the 7-day window, millions of USD."},"avgDailyUsdM":{"type":"number","example":171.9,"description":"Average daily net flow over the window, millions of USD."},"positiveDays":{"type":"number","example":5,"description":"Number of days with net inflow (> 0) in the window."},"negativeDays":{"type":"number","example":2,"description":"Number of days with net outflow (< 0) in the window."}},"required":["symbol","asset","netFlowUsdM","avgDailyUsdM","positiveDays","negativeDays"]},"WeeklyAnalyticsDto":{"type":"object","properties":{"from":{"type":"string","example":"2026-06-10","description":"Window start date (UTC, inclusive)."},"to":{"type":"string","example":"2026-06-16","description":"Window end date (UTC, inclusive)."},"assets":{"description":"One entry per tracked asset.","type":"array","items":{"$ref":"#/components/schemas/WeeklyAssetDto"}}},"required":["from","to","assets"]}}}}