{"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`.\n\nReuse with attribution is welcome; copying the work is not. Data (/api/*): CC BY 4.0. Charts, screenshots, embeds and quotes: free to reuse when credited \"MarketGrep (marketgrep.com)\" with a link. No derivative or look-alike sites, no use of the brand names, no citation without the source. Terms: https://lite.marketgrep.com/license/","termsOfService":"https://lite.marketgrep.com/license/","contact":{"name":"MarketGrep","url":"https://lite.marketgrep.com/developers","email":"support@grep24.com"},"license":{"name":"Data: CC BY 4.0 · Reuse with attribution · No copies","url":"https://lite.marketgrep.com/license/"},"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 and uptime.\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.\n\nCache-Control: no-store, so an edge cache in front of `/api/*`\ncannot 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 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, upstream 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 client\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 on the free 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 a public symbol-search endpoint, normalizes the payload, and\ncaches successful responses on disk for 24h. Never raises — empty\nresults with an `error_reason` field on upstream failure so the picker\ndegrades gracefully.\n\nAdditive-only: new fields may appear, existing ones will not change\nshape.","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/options/atm":{"get":{"summary":"Options Atm","description":"ATM option quotes around a date — delayed relay.\n\nReturns spot plus the bid/ask/last/IV of the one or two strikes that\nbracket spot, for the first expiration on or after `on` and the last\none strictly before it. Intended for callers that do their own\nstraddle/IV math — this endpoint ships raw quotes and never a derived\nnumber.\n\nQuotes are delayed (`delayed: true`); an in-process 15-minute memo\nkeyed on `symbol|on` bounds how often we call upstream.","operationId":"options_atm_api_options_atm_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"","title":"Symbol"}},{"name":"on","in":"query","required":false,"schema":{"type":"string","default":"","title":"On"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/predict/kalshi/events":{"get":{"summary":"Predict Kalshi Events","description":"Kalshi `/trade-api/v2/events` passed through unchanged.\n\nExists because Cloudflare Workers share egress IPs and Kalshi 429s them\non nearly every call; this box has its own IP. Query is allow-listed\nand validated in `services/kalshi_relay.py`; the body is Kalshi's own\n(plus the rights members), never a derived number — the Pro worker owns\nall selection and scoring. 5-minute in-process memo per canonical query.","operationId":"predict_kalshi_events_api_predict_kalshi_events_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"","title":"Status"}},{"name":"with_nested_markets","in":"query","required":false,"schema":{"type":"string","default":"","title":"With Nested Markets"}},{"name":"series_ticker","in":"query","required":false,"schema":{"type":"string","default":"","title":"Series Ticker"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","default":"","title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/options/summary":{"get":{"summary":"Options Summary","description":"Three-tenor ATM option quotes — delayed relay.\n\nReturns spot plus, for each of ~1 week / ~1 month / ~6 months, the\nbracketing strikes with both sides — the same `strikes` shape as\n`/api/options/atm`, so one consumer-side straddle/IV routine serves\nboth. Intended for callers that turn the three tenors into an expected\nrange and a term-structure shape; this endpoint ships raw quotes and\nnever a derived number.\n\nAny tenor can be `null` — no listed expiry clears its day floor, or\nthat one chain call failed. Quotes are delayed (`delayed: true`); an\nin-process 15-minute memo keyed on `symbol|today` bounds how often we\ncall upstream.","operationId":"options_summary_api_options_summary_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"","title":"Symbol"}}],"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"}}}}