{"uid":"cap_abux7wsS42YuKVuq6p2nA","slug":"api-stocktrends-com-26079f02","name":"Stock Trends Historical Sector Leadership Rotation","description":"Historical sector leadership rotation derived from Stock Trends trend distribution, relative performance, and trend maturity measures.","url":"https://api.stocktrends.com/v1/leadership/rotation/history","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"end":{"type":"string","format":"date"},"type":{"type":"string","default":"CS"},"limit":{"type":"integer","default":2000,"maximum":50000,"minimum":1},"start":{"type":"string","format":"date"},"top_k":{"type":"integer","default":5,"maximum":50,"minimum":1},"exchange":{"enum":["N","Q","A","B","T","I"],"type":"string"},"group_by_week":{"type":"boolean","default":true},"min_constituents":{"type":"integer","default":25,"maximum":5000,"minimum":1}},"additionalProperties":false}},"additionalProperties":false},"title":{"type":"string"},"family":{"type":"string"},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"format":{"type":"string"},"example":{}},"description":"Historical sector leadership rotation with bullish share, average RSI, trend maturity, leadership_score, and weekly rank.","additionalProperties":true},"category":{"type":"string"},"schemaUrl":{"type":"string"},"description":{"type":"string"},"metadataUrl":{"type":"string"},"tools_manifest":{"type":"string"},"pricing_catalog":{"type":"string"}},"additionalProperties":true},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"end":"2023-12-31","type":"CS","start":"2023-01-01","top_k":5,"exchange":"Q","group_by_week":true,"min_constituents":25}}},"response":{"_truncated":true,"_originalSize":63982}},"exampleRequest":{"end":"2023-12-31","type":"CS","start":"2023-01-01","top_k":5,"exchange":"Q","group_by_week":true,"min_constituents":25},"tags":["x402"],"displayCostAmount":"0.3","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.3/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.3","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.3","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-fjaeD6hWNXns1vraWFiY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.3","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical sector leadership rotation data including bullish share, average RSI, trend maturity, leadership score, and weekly rank derived from Stock Trends trend distribution and relative performance measures.","exampleAgentPrompt":"Show me the historical sector leadership rotation on NASDAQ (Q) from January 1 2023 to December 31 2023, grouped by week, with the top 5 sectors and at least 25 constituents per sector.","exampleUseCases":[{"title":"Backtest sector rotation strategy performance","prompt":"I want to analyze sector leadership rotation patterns on the NYSE from 2021 through 2023 to see if I can identify seasonal trends. Show me the weekly leadership scores and bullish share for all sectors, then help me spot which ones consistently led in Q4 versus Q2."},{"title":"Compare leadership trends across exchanges","prompt":"Pull the historical sector leadership data for both NASDAQ and NYSE for the past 18 months, showing me week-by-week how the top 3 leading sectors differed between the two exchanges. I want to see their RSI and trend maturity scores to understand which market showed stronger conviction."},{"title":"Track recovery sectors after market downturns","prompt":"Show me the sector leadership rotation data from March 2020 through June 2020 on a weekly basis. I'm looking to understand which sectors rotated into leadership positions during the market recovery and how their bullish share and trend maturity evolved over those months."}],"resultDescription":"A time series of weekly sector leadership snapshots, each including the sector name, bullish share percentage, average RSI, trend maturity score, a composite leadership_score, and the sector's rank among peers — covering the requested date range and filtered by exchange and minimum constituent count.","failureModes":["Invalid date range (start after end) returns 400 error","Exchange enum value not in allowed set (N, Q, A, B, T, I) returns validation error","top_k exceeds maximum of 50 returns 400","min_constituents exceeds 5000 returns 400","No data available for the requested date range returns empty result set","Payment not provided or insufficient USDC returns 402"],"whenToPreferThis":"Use this endpoint when you need historical perspective on which sectors led the market over time, want to study sector rotation patterns, or need to backtest strategies based on sector leadership trends. Prefer this over the current leadership endpoint when temporal analysis, backtesting, or multi-period comparison is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:57:15.773Z","isFirstParty":false}