{"openapi":"3.1.0","info":{"title":"MarketGrep API","description":"Public JSON API behind MarketGrep (市场脉动), the daily US & global market-environment dashboard by GREP24. No authentication. Human-readable docs: /developers · agent manifest: /llms.txt · every HTML page also serves Markdown via `Accept: text/markdown`.","contact":{"name":"MarketGrep","url":"https://lite.marketgrep.com/developers","email":"support@grep24.com"},"version":"0.2.0"},"servers":[{"url":"https://lite.marketgrep.com","description":"Production"}],"paths":{"/api/health/memory":{"get":{"summary":"Health Memory","description":"Process resource snapshot — memory, GC, uptime, cache sizes.\n\nDesigned to be cheap to call (no allocation beyond the tiny\nresponse dict) so external monitors can poll it every minute and\nchart the RSS trend. Useful for spotting allocator-fragmentation\ndrift without shelling into the container.\n\nCache-Control: no-store so Cloudflare's `/api/*` cache rule (which\nfalls back to a 4h browser TTL when origin omits a directive)\ndoesn't freeze the snapshot.","operationId":"health_memory_api_health_memory_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/version":{"get":{"summary":"Version","operationId":"version_api_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/summary":{"get":{"summary":"Summary","operationId":"summary_api_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agent-context":{"get":{"summary":"Agent Context","description":"Plain-English market summary plus day-over-day delta.\n\nDesigned so an AI agent can fetch one URL and get a copy-pasteable\nnarrative with citation guidance, instead of orchestrating four\ndifferent endpoints. The shape is intentionally flat and stable.","operationId":"agent_context_api_agent_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/market-overview":{"get":{"summary":"Market Overview","operationId":"market_overview_api_market_overview_get","parameters":[{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/global-overview":{"get":{"summary":"Global Overview","operationId":"global_overview_api_global_overview_get","parameters":[{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/refresh":{"post":{"summary":"Trigger Refresh","description":"Trigger a manual market-data refresh.\n\n`?force_cold=true` additionally deletes the shared price pickles\nbefore refreshing — used to recover from a collapsed/corrupted\ncache that's passing shape checks but has sparse per-ticker data.","operationId":"trigger_refresh_api_refresh_post","parameters":[{"name":"force_cold","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Cold"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/refresh-sentiment":{"post":{"summary":"Trigger Refresh Sentiment","operationId":"trigger_refresh_sentiment_api_refresh_sentiment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sentiment-report":{"get":{"summary":"Sentiment Report","operationId":"sentiment_report_api_sentiment_report_get","parameters":[{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sentiment-report/history":{"get":{"summary":"Sentiment Report History","description":"Read-only listing of recent WSB report runs (newest first) for\ndiffing consecutive versions. `markdown=true` includes the Chinese\nreport body (~10-15KB per run); the default is metadata only.","operationId":"sentiment_report_history_api_sentiment_report_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"markdown","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Markdown"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/turbulence":{"get":{"summary":"Turbulence Report","operationId":"turbulence_report_api_turbulence_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"3y","title":"Range"}},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Summary"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/refresh-turbulence":{"post":{"summary":"Trigger Refresh Turbulence","operationId":"trigger_refresh_turbulence_api_refresh_turbulence_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/most-active":{"get":{"summary":"Most Active","operationId":"most_active_api_most_active_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/intraday":{"get":{"summary":"Intraday Batch","description":"Batch intraday for iOS watchlists. Up to 20 tickers per request.\n\nQuery: `?tickers=AAPL,MSFT,TSLA&compact=true`\n\nReturns `{\"results\": {ticker: IntradayResponse, ...},\n          \"errors\":  {ticker: \"reason\", ...}}`.\n\nPer-ticker failures (bad symbol, Yahoo error) land in `errors`\nwithout failing the whole batch. The whole request 400s only when\nthe `tickers` param itself is empty or oversize.\n\nCache-Control is set to the **most aggressive** tier across the\nbatch — i.e. if any one ticker is in regular session, the whole\nresponse uses the regular-session max-age. This keeps the iOS\npoll cadence correct for the most-volatile member.","operationId":"intraday_batch_api_intraday_get","parameters":[{"name":"tickers","in":"query","required":false,"schema":{"type":"string","default":"","title":"Tickers"}},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/intraday/{ticker}":{"get":{"summary":"Intraday","description":"Today's intraday tape for one ticker (5-minute bars, ~15 min delayed).\n\nReturns an `IntradayResponse` with the bars array + `meta` carrying\nmarket_state, exchange_tz, regular_start/end, previous_close, and\nthe disclosed `delay_seconds` (≈ 15 min for the free Yahoo feed).\nClients should surface the delay disclosure in chart chrome and\nbranch their \"Markets closed / Pre-market / After hours\" banners\noff `market_state`.\n\n`?compact=true` drops O/H/L from each bar (keeps ts/close/volume) —\nuse it for sparklines / list-row charts where OHL isn't drawn.\n\nCache strategy mirrors upstream cadence (30s regular / 2m\npre+post / 1h closed). Heavy lifting + the in-memory TTL cache\nlive in `intraday_service.fetch_intraday`.","operationId":"intraday_api_intraday__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ticker-detail/{ticker}":{"get":{"summary":"Ticker Detail","operationId":"ticker_detail_api_ticker_detail__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}},{"name":"universe","in":"query","required":false,"schema":{"type":"string","default":"","title":"Universe"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search":{"get":{"summary":"Search","description":"Open-universe symbol search.\n\nProxies Yahoo Finance's public search endpoint, normalizes the payload,\nand caches successful responses on disk for 24h. Never raises — empty\nresults with an `error_reason` field on upstream failure so the picker\ndegrades gracefully.\n\nNot consumed by iOS (which has its own search planned). Adding fields\nlater is therefore safe.","operationId":"search_api_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/13f/managers":{"get":{"tags":["13f"],"summary":"List Managers","description":"Flat list of all active managers with the data the card grid needs.","operationId":"list_managers_api_13f_managers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/13f/managers/{slug}":{"get":{"tags":["13f"],"summary":"Manager Detail","description":"Manager editorial page payload — pure read path.\n\nSources:\n  - About body + tags + through-line style → data/manager_about/{slug}.{locale}.md\n  - Quarter chapter narratives             → data/manager_narratives/{slug}/{period}.{locale}.md\n  - Holdings / scale_arc / persistent_core → computed from ingested Filings","operationId":"manager_detail_api_13f_managers__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quarter"}},{"name":"locale","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"}},{"name":"include_chapters","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Chapters"}},{"name":"max_chapters","in":"query","required":false,"schema":{"type":"integer","default":6,"title":"Max Chapters"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/13f/managers/{slug}/export.csv":{"get":{"tags":["13f"],"summary":"Manager Export Csv","operationId":"manager_export_csv_api_13f_managers__slug__export_csv_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quarter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/13f/stocks/{ticker}":{"get":{"tags":["13f"],"summary":"Stock Detail","description":"Cross-manager stock lens. Returns the set of curated managers\nholding this ticker in the requested quarter.","operationId":"stock_detail_api_13f_stocks__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}},{"name":"quarter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quarter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/13f/managers/{slug}/holdings/{ticker}":{"get":{"tags":["13f"],"summary":"Manager Stock Lens","description":"Long-tail SEO page — one manager × one ticker, full history.","operationId":"manager_stock_lens_api_13f_managers__slug__holdings__ticker__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/13f/overview":{"get":{"tags":["13f"],"summary":"Overview","description":"Top-of-page header summary. The 'aggregate buys / sells / crowded'\nsections were dropped from the UI; this endpoint only returns the\ncounts needed for the header chip row.","operationId":"overview_api_13f_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}