{"uid":"cap_E1e38fbKg7APIxDwReCv5","slug":"api-stocktrends-com-cc9eec85","name":"Stock Trends Historical Sector/Industry Breadth Series","description":"Historical sector, industry-group, or industry breadth series derived from Stock Trends signal distribution.","url":"https://api.stocktrends.com/v1/breadth/sector/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"},"limit":{"type":"integer","default":5000,"maximum":500000,"minimum":1},"start":{"type":"string","format":"date"},"cs_only":{"type":"boolean","default":true},"exchange":{"enum":["N","Q","A","B","T","I"],"type":"string"},"group_level":{"enum":["sector","industry_group","industry"],"type":"string","default":"sector"},"group_by_week":{"type":"boolean","default":true},"include_unknown":{"type":"boolean","default":false}},"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 breadth groups and weekly signal distribution metrics.","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","limit":500,"start":"2020-01-01","cs_only":true,"exchange":"N","group_level":"sector","group_by_week":true}}},"response":{"_bytes":262144,"_preview":"{\"request_id\":\"2d1a25aa-325d-4d72-8cbe-8453ec7b9a95\",\"group_level\":\"sector\",\"exchange\":\"N\",\"start\":\"2020-01-01\",\"end\":\"2023-12-31\",\"cs_only\":true,\"include_unknown\":false,\"week_count\":46,\"count\":500,\"weeks\":[{\"weekdate\":\"2020-01-03\",\"count\":11,\"data\":[{\"weekdate\":\"2020-01-03\",\"sector_code\":\"104\",\"sector_name\":\"FINANCE\",\"total\":621,\"bullish_count\":445,\"bearish_count\":162,\"neutral_count\":14,\"avg_trend_cnt\":17.37,\"avg_trend_cnt_bullish\":21.5,\"avg_trend_cnt_bearish\":7.52,\"max_trend_cnt\":76,\"avg_mt_cnt\":27.64,\"avg_mt_cnt_bullish\":29.37,\"avg_mt_cnt_bearish\":25.27,\"max_mt_cnt\":192,\"avg_rsi\":94.94,\"rsi_ge_110_count\":25,\"rsi_ge_120_count\":5,\"young_bullish_count\":81,\"mature_bullish_count\":195,\"bullish_pct\":0.71658615136876,\"bearish_pct\":0.2608695652173913,\"neutral_pct\":0.02254428341384863,\"net_breadth\":283,\"rsi_ge_110_pct\":0.040257648953301126,\"rsi_ge_120_pct\":0.008051529790660225,\"young_bullish_pct\":0.13043478260869565,\"mature_bullish_pct\":0.3140096618357488},{\"weekdate\":\"2020-01-03\",\"sector_code\":\"106\",\"sector_name\":\"INDUSTRIALS\",\"total\":284,\"bullish_count\":203,\"bearish_count\":77,\"neutral_count\":4,\"avg_trend_cnt\":10.23,\"avg_trend_cnt_bullish\":12.37,\"avg_trend_cnt_bearish\":5.09,\"max_trend_cnt\":41,\"avg_mt_cnt\":26.66,\"avg_mt_cnt_bullish\":24.77,\"avg_mt_cnt_bearish\":33.03,\"max_mt_cnt\":298,\"avg_rsi\":100.95,\"rsi_ge_110_count\":62,\"rsi_ge_120_count\":22,\"young_bullish_count\":50,\"mature_bullish_count\":40,\"bullish_pct\":0.7147887323943662,\"bearish_pct\":0.2711267605633803,\"neutral_pct\":0.014084507042253521,\"net_breadth\":126,\"rsi_ge_110_pct\":0.21830985915492956,\"rsi_ge_120_pct\":0.07746478873239436,\"young_bullish_pct\":0.176056338028169,\"mature_bullish_pct\":0.14084507042253522},{\"weekdate\":\"2020-01-03\",\"sector_code\":\"101\",\"sector_name\":\"CONSUMER DISCRETIONARY\",\"total\":229,\"bullish_count\":139,\"bearish_count\":82,\"neutral_count\":8,\"avg_trend_cnt\":9.18,\"avg_trend_cnt_bullish\":11.32,\"avg_trend_cnt_bearish\":6.45,\"max_trend_cnt\":50,\"avg_mt_cnt\":27.59,\"avg_mt_cnt_bullish\":24.5,\"avg_mt_cnt_bearish\":3","_truncated":true,"_contentType":"application/json"}},"exampleRequest":{"end":"2023-12-31","limit":500,"start":"2020-01-01","cs_only":true,"exchange":"N","group_level":"sector","group_by_week":true},"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_EzUn4bxOs7l4phd-Z4uz1","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 breadth time series for a sector, industry group, or industry based on Stock Trends signal distribution across constituent stocks.","exampleAgentPrompt":"Pull me the weekly sector-level breadth history from Stock Trends for common stocks on the NYSE from January 2020 to December 2023, showing up to 500 records.","exampleUseCases":[{"title":"Backtest sector rotation strategy","prompt":"I need the daily breadth history for technology, healthcare, and financials industries going back three years so I can backtest how my sector rotation signals would have performed during different market regimes."},{"title":"Identify breadth divergences by industry","prompt":"Show me the weekly breadth trends for all NASDAQ industry groups over the past two years — I'm looking for divergences where some groups had improving breadth while the overall market was weakening."},{"title":"Track market leadership deterioration","prompt":"Pull the historical weekly breadth data for the S&P 500 sectors from 2022 to now, I want to see when leadership started breaking down and how many stocks in each sector fell out of uptrend during the selloff."}],"resultDescription":"A JSON array of historical breadth data points grouped by sector, industry group, or industry, each containing Stock Trends signal distribution metrics (e.g., percentage of stocks in various trend states) aggregated weekly or daily over the requested date range.","failureModes":["Invalid date format for start/end returns a 400 error","Unsupported exchange code returns a 400 validation error","limit exceeding 500000 returns a 400 error","No data available for the specified date range returns an empty result set","Payment not fulfilled (x402) returns a 402 Payment Required response","Invalid group_level enum value returns a 400 error"],"whenToPreferThis":"Use this endpoint when you need longitudinal breadth data aggregated at the sector, industry group, or industry level based on Stock Trends signal classifications — particularly for backtesting, regime analysis, or understanding how breadth has evolved over multi-year periods. Prefer this over the current regime or leadership endpoints when historical time-series context is needed rather than a snapshot.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:33:31.817Z","isFirstParty":false}