{"openapi":"3.0.0","paths":{"/api/v1/altcoin-season-index":{"get":{"description":"The latest stored daily reading: headline index, every window, Bitcoin dominance, how many index coins beat Bitcoin, and whether altcoin season is confirmed. Pass `days` for the stored daily history.","operationId":"getAltcoinSeasonIndex","parameters":[{"name":"days","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":365},"description":"Include up to this many days of stored history, oldest first."}],"responses":{"200":{"headers":{"RateLimit-Limit":{"description":"Maximum requests in the window.","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"Requests remaining before rejection.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketIndexResponseDto"}}}},"400":{"description":"days is out of range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"The IP address has used all 100 requests in the current minute.","headers":{"RateLimit-Limit":{"description":"Maximum requests in the window.","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"Requests remaining before rejection.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"503":{"description":"No snapshot is stored yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"summary":"Latest Altcoin Season Index","tags":["MarketPages","Altcoin Season Index"]}},"/api/v1/reddit-analysis":{"get":{"description":"Published analyses, newest first. An empty archive returns an empty data array.","operationId":"listRedditAnalyses","parameters":[{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"offset","required":false,"in":"query","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"description":"Maximum requests in the window.","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"Requests remaining before rejection.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedditAnalysisListResponseDto"}}}},"400":{"description":"limit or offset is out of range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"The IP address has used all 100 requests in the current minute.","headers":{"RateLimit-Limit":{"description":"Maximum requests in the window.","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"Requests remaining before rejection.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"summary":"List analyses","tags":["App","Community analysis"]}},"/api/v1/reddit-analysis/{id}":{"get":{"description":"The full analysis, topics, sentiment and source discussions for one published ID.","operationId":"getRedditAnalysis","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"description":"Maximum requests in the window.","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"Requests remaining before rejection.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}}},"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedditAnalysisDetailResponseDto"}}}},"400":{"description":"id is not a positive whole number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"404":{"description":"No published analysis has this ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}},"429":{"description":"The IP address has used all 100 requests in the current minute.","headers":{"RateLimit-Limit":{"description":"Maximum requests in the window.","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"Requests remaining before rejection.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"}}}}},"summary":"Get one analysis","tags":["App","Community analysis"]}}},"info":{"title":"Altcoin Season Tracker Public API","description":"The Altcoin Season Index and source-linked Reddit community analysis as JSON. No authentication; 100 requests per minute per IP address.","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"http://localhost:3000"}],"components":{"schemas":{"HeadlineIndexDto":{"type":"object","properties":{"value":{"type":"integer","example":62,"description":"Share of index coins beating Bitcoin, 0–100."},"window":{"type":"string","enum":["90d","30d"],"description":"90d once a full window exists, otherwise 30d."},"provisional":{"type":"boolean","description":"True while the 90-day window is still filling and 30d is shown."},"status":{"type":"string","enum":["Altcoin Season","Transition Zone","Bitcoin Season"]}},"required":["value","window","provisional","status"]},"IndexWindowsDto":{"type":"object","properties":{"7d":{"type":"integer","nullable":true,"example":58},"30d":{"type":"integer","nullable":true,"example":61},"90d":{"type":"integer","nullable":true,"example":62},"200d":{"type":"integer","nullable":true,"example":40},"1y":{"type":"integer","nullable":true,"example":35}},"required":["7d","30d","90d","200d","1y"]},"CoinsBeatingBitcoinDto":{"type":"object","properties":{"count":{"type":"integer","example":31},"measured":{"type":"integer","example":50},"window":{"type":"string","enum":["90d","30d"]}},"required":["count","measured","window"]},"MarketIndexDataDto":{"type":"object","properties":{"date":{"type":"string","example":"2026-11-10","description":"UTC snapshot date."},"updatedAt":{"type":"string","example":"2026-11-10T12:00:00.000Z","description":"When the snapshot was last written."},"stale":{"type":"boolean","description":"True when the latest snapshot is more than 36 hours old."},"index":{"$ref":"#/components/schemas/HeadlineIndexDto"},"windows":{"$ref":"#/components/schemas/IndexWindowsDto"},"bitcoinDominance":{"type":"number","nullable":true,"example":55.2,"description":"Percent of total market cap."},"coinsBeatingBitcoin":{"$ref":"#/components/schemas/CoinsBeatingBitcoinDto"},"altcoinSeasonConfirmed":{"type":"boolean","nullable":true,"description":"Index at or above 75 and dominance at or below 42%. Null when dominance is missing."}},"required":["date","updatedAt","stale","index","windows","bitcoinDominance","coinsBeatingBitcoin","altcoinSeasonConfirmed"]},"MarketIndexHistoryRowDto":{"type":"object","properties":{"date":{"type":"string","example":"2026-11-09"},"index30d":{"type":"integer","nullable":true},"index90d":{"type":"integer","nullable":true},"bitcoinDominance":{"type":"number","nullable":true}},"required":["date","index30d","index90d","bitcoinDominance"]},"MarketIndexLinksDto":{"type":"object","properties":{"page":{"type":"string"},"methodology":{"type":"string"},"csv":{"type":"string"}},"required":["page","methodology","csv"]},"MarketIndexResponseDto":{"type":"object","properties":{"apiVersion":{"type":"string","example":"1.0"},"data":{"$ref":"#/components/schemas/MarketIndexDataDto"},"history":{"description":"Present when `days` is given. Stored days only; gaps are not filled.","type":"array","items":{"$ref":"#/components/schemas/MarketIndexHistoryRowDto"}},"source":{"type":"string","example":"Computed by Altcoin Season Tracker from CoinGecko market data."},"links":{"$ref":"#/components/schemas/MarketIndexLinksDto"}},"required":["apiVersion","data","source","links"]},"ApiErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","example":400},"message":{"type":"string","example":"limit must be a whole number between 1 and 100."},"error":{"type":"string","example":"Bad Request"}},"required":["statusCode","message","error"]},"RedditAnalysisSourceDto":{"type":"object","properties":{"title":{"type":"string","example":"Source discussion title"},"url":{"type":"string","format":"uri","example":"https://www.reddit.com/r/CryptoCurrency/..."},"author":{"type":"string","nullable":true,"example":"u/example"},"score":{"type":"number","example":812},"comments":{"type":"number","example":146},"publishedAt":{"type":"string","format":"date-time","nullable":true,"example":"2026-08-13T07:30:00.000Z"}},"required":["title","url","author","score","comments","publishedAt"]},"RedditAnalysisDto":{"type":"object","properties":{"id":{"type":"number","example":42},"date":{"type":"string","format":"date","example":"2026-08-13"},"publishedAt":{"type":"string","format":"date-time","example":"2026-08-13T09:00:00.000Z"},"title":{"type":"string","example":"Market structure dominates the daily discussion"},"summary":{"type":"string","example":"A concise overview of the leading themes."},"analysis":{"type":"string","description":"The complete published analysis."},"sentiment":{"type":"string","example":"Mixed"},"keyTopics":{"example":["Bitcoin dominance","Market structure"],"type":"array","items":{"type":"string"}},"totalEngagement":{"type":"number","description":"Sum of source scores and comments.","example":18420},"sources":{"type":"array","items":{"$ref":"#/components/schemas/RedditAnalysisSourceDto"}},"articleUrl":{"type":"string","format":"uri","description":"Published article on this site."},"imageUrl":{"type":"string","format":"uri"}},"required":["id","date","publishedAt","title","summary","analysis","sentiment","keyTopics","totalEngagement","sources","articleUrl","imageUrl"]},"PaginationDto":{"type":"object","properties":{"count":{"type":"number","description":"Items in this page.","example":1},"total":{"type":"number","description":"Published analyses in the archive.","example":42},"limit":{"type":"number","minimum":1,"maximum":100,"example":20},"offset":{"type":"number","minimum":0,"maximum":100000,"example":0}},"required":["count","total","limit","offset"]},"CollectionLinksDto":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"next":{"type":"string","format":"uri","nullable":true},"previous":{"type":"string","format":"uri","nullable":true}},"required":["self","next","previous"]},"RedditAnalysisListResponseDto":{"type":"object","properties":{"apiVersion":{"type":"string","example":"1.0"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RedditAnalysisDto"}},"pagination":{"$ref":"#/components/schemas/PaginationDto"},"links":{"$ref":"#/components/schemas/CollectionLinksDto"}},"required":["apiVersion","data","pagination","links"]},"DetailLinksDto":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"collection":{"type":"string","format":"uri"}},"required":["self","collection"]},"RedditAnalysisDetailResponseDto":{"type":"object","properties":{"apiVersion":{"type":"string","example":"1.0"},"data":{"$ref":"#/components/schemas/RedditAnalysisDto"},"links":{"$ref":"#/components/schemas/DetailLinksDto"}},"required":["apiVersion","data","links"]}}},"externalDocs":{"description":"API documentation","url":"http://localhost:3000/api"},"security":[]}