From 1d0889cf42215c976eeb39420a95a1ce9eba2a40 Mon Sep 17 00:00:00 2001 From: MarketDataDev01 Date: Mon, 13 Jul 2026 19:04:02 -0300 Subject: [PATCH 1/2] docs(stocks): document candle split/dividend adjustment rules Companion to api PR #212, which unifies the adjustsplits/adjustdividends contract on the stock candles endpoint and the Sheets STOCKDATA formula. - api/stocks/candles.mdx: document the previously-undocumented `adjustdividends` parameter and add a "Split and Dividend Adjustments" section covering the three supported CRSP-style views (raw, split-only, fully adjusted) and the combinations now rejected with HTTP 400 (daily divs-only; any adjustdividends=true on intraday). - sheets/stocks/stockdata.md: correct the `adjusted`/`unadjusted` attribute descriptions and document them as standalone attributes that return a full OHLCV row (parity with "all"). --- api/stocks/candles.mdx | 33 ++++++++++++++++++++++++++++++++- sheets/stocks/stockdata.md | 4 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/api/stocks/candles.mdx b/api/stocks/candles.mdx index df39758..670abbc 100644 --- a/api/stocks/candles.mdx +++ b/api/stocks/candles.mdx @@ -222,7 +222,14 @@ There is no maximum date range limit on daily candles. When requesting intraday - **adjustsplits** `boolean` - Adjust historical data for stock splits. Market Data uses the CRSP methodology for adjustment. + Adjust historical data for stock splits. Market Data uses the CRSP methodology for adjustment. Only certain combinations with `adjustdividends` are supported — see [Split and Dividend Adjustments](#split-and-dividend-adjustments). + + - Daily candles default: `true`. + - Intraday candles default: `false`. + +- **adjustdividends** `boolean` + + Adjust historical data for dividends. Market Data uses the CRSP methodology for adjustment. Dividend adjustment is available for daily resolutions only. Unsupported combinations are rejected with an HTTP 400 — see [Split and Dividend Adjustments](#split-and-dividend-adjustments). - Daily candles default: `true`. - Intraday candles default: `false`. @@ -230,6 +237,30 @@ There is no maximum date range limit on daily candles. When requesting intraday +### Split and Dividend Adjustments + +Only three price series are supported: **raw**, **split-only**, and **fully adjusted** (CRSP-style). There is no dividend-only series — no data source publishes one — so that combination is rejected with an HTTP 400. + +Validation runs on the *resolved* flag values (after the daily/intraday defaults are applied), so a request that omits a flag is validated against the default it resolved to. + +**Daily** — the `adjustsplits=false, adjustdividends=true` combination is rejected. Because `adjustdividends` defaults to `true` on daily candles, this is most commonly triggered by passing `adjustsplits=false` alone. To receive raw prices on daily candles, set **both** `adjustsplits=false` and `adjustdividends=false`. + +| `adjustsplits` | `adjustdividends` | Series | Result | +|:---:|:---:|---|---| +| `false` | `false` | raw | ✅ | +| `true` | `false` | split-only | ✅ | +| `true` | `true` | fully adjusted | ✅ (default) | +| `false` | `true` | dividend-only | ❌ HTTP 400 | + +**Intraday** — any `adjustdividends=true` is rejected regardless of `adjustsplits`, because no intraday data source implements dividend adjustment. The intraday default is `false`, so the error only occurs on an explicit `adjustdividends=true`. + +| `adjustsplits` | `adjustdividends` | Series | Result | +|:---:|:---:|---|---| +| `false` | `false` | raw | ✅ (default) | +| `true` | `false` | split-only | ✅ | +| `false` | `true` | dividend-only | ❌ HTTP 400 | +| `true` | `true` | fully adjusted | ❌ HTTP 400 | + ## Response Attributes diff --git a/sheets/stocks/stockdata.md b/sheets/stocks/stockdata.md index 69b8b5b..4b12a95 100644 --- a/sheets/stocks/stockdata.md +++ b/sheets/stocks/stockdata.md @@ -51,8 +51,8 @@ Fetches a current stock quote or historical stock candles from Market Data. It c - "volume" – The number of shares traded. - "all" – Returns all values. - "symbol" - The ticker symbol of the stock. _Only returned when using a bulk candles formula._ - - "adjusted" - Adjust intraday data for splits. - - "unadjusted" - Do not adjust daily data for splits. + - "adjusted" - Returns split- and dividend-adjusted prices (CRSP methodology). On daily resolutions both split and dividend adjustments are applied; on intraday resolutions only split adjustment is applied, since dividend adjustment is available for daily resolutions only. Can be used on its own — `=STOCKDATA("AAPL", "adjusted", ...)` returns the full adjusted OHLCV row, just like "all" — or combined with a specific column, e.g. "adjusted,close". + - "unadjusted" - Returns raw prices with no split or dividend adjustment. Can be used on its own — `=STOCKDATA("AAPL", "unadjusted", ...)` returns the full unadjusted OHLCV row, just like "all" — or combined with a specific column, e.g. "unadjusted,close". - **quote attributes** _(OPTIONAL – "mid" by default)_ Use one of the following attributes when requesting a quote: - "mid", "mark" – The midpoint price of the stock. From 9ab20fb7183a91c04b02c12818aaccda7f386117 Mon Sep 17 00:00:00 2001 From: MarketDataDev01 Date: Mon, 13 Jul 2026 19:09:48 -0300 Subject: [PATCH 2/2] docs(stocks): drop resolved-flags validation note --- api/stocks/candles.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/stocks/candles.mdx b/api/stocks/candles.mdx index 670abbc..08a997b 100644 --- a/api/stocks/candles.mdx +++ b/api/stocks/candles.mdx @@ -241,8 +241,6 @@ There is no maximum date range limit on daily candles. When requesting intraday Only three price series are supported: **raw**, **split-only**, and **fully adjusted** (CRSP-style). There is no dividend-only series — no data source publishes one — so that combination is rejected with an HTTP 400. -Validation runs on the *resolved* flag values (after the daily/intraday defaults are applied), so a request that omits a flag is validated against the default it resolved to. - **Daily** — the `adjustsplits=false, adjustdividends=true` combination is rejected. Because `adjustdividends` defaults to `true` on daily candles, this is most commonly triggered by passing `adjustsplits=false` alone. To receive raw prices on daily candles, set **both** `adjustsplits=false` and `adjustdividends=false`. | `adjustsplits` | `adjustdividends` | Series | Result |