diff --git a/api/stocks/candles.mdx b/api/stocks/candles.mdx index df39758..08a997b 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,28 @@ 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. + +**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.