Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions apps/developer-hub/content/docs/price-feeds/pro/api/history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ All `{channel}` path segments refer to a price channel (e.g. `real_time`, `fixed
connect TradingView charting UIs directly to this API.
</Callout>

<Callout type="warn">
**Channel choice affects returned data.** The `{channel}` segment is not just
a transport option — it materially changes the values returned by both
`/{channel}/price` (point-in-time lookups) and `/{channel}/history` (OHLC
candles). Sub-second price updates visible on `real_time` or
`fixed_rate@50ms` may be absent from coarser channels like
`fixed_rate@1000ms`, causing candle highs and lows to differ for the same
time window. Note that `pythdata.app` charts use `fixed_rate@1000ms`, so
candles there can differ from those on `real_time` or `fixed_rate@50ms`. For
settlement, backtesting, or exact-published-price workflows, always query the
same channel your downstream process depends on. See the [worked
example](#channel-resolution-example) below.
</Callout>

## Endpoints

| Method | Path | Auth | Description |
Expand Down Expand Up @@ -107,6 +121,36 @@ Returns OHLC candlestick data in TradingView format.

Arrays are aligned by index — `t[0]`, `o[0]`, `h[0]`, `l[0]`, `c[0]` represent the same candle.

#### Channel resolution example

The channel you query determines which price updates are included in each
candle. Coarser channels sample fewer updates per second, so sub-second price
spikes may not appear.

**Feed:** `Equity.US.MSFT/USD` (`pyth_lazer_id=1292`), 2026-05-29.

On `fixed_rate@50ms`, the following prices were published around market close:

| Timestamp (ET) | Price | Market status |
| ---------------- | ----------- | ------------- |
| `15:59:59.500` | `449.99680` | regular |
| `15:59:59.700` | `450.00000` | regular |
| `15:59:59.800` | `449.99680` | regular |
| `16:00:00.000` | `449.99500` | postMarket |

The `15:59` one-minute candle **high** differs by channel:

| Channel | Candle high |
| ---------------------------------- | ----------- |
| `real_time` / `fixed_rate@50ms` | `450.01` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Example candle high (450.01) contradicts the sample price data (max 450.00000)

The worked example at lines 134–139 lists four specific prices "published around market close" on fixed_rate@50ms, the highest being 450.00000. However, the candle high table at line 145 claims the real_time / fixed_rate@50ms candle high is 450.01 — a value that exceeds every price shown in the sample data. This is internally contradictory: a candle high cannot exceed the maximum published price within the window. Either the sample data table is missing rows that include a 450.01 tick, or the candle high should be 450.00000 (or 450.00). As written, the example will confuse developers trying to learn how channel resolution affects candle values, which undermines the purpose of the new documentation.

Prompt for agents
The candle high for real_time / fixed_rate@50ms is listed as 450.01 but the sample data table (lines 134-139) only shows prices up to 450.00000. These must be reconciled: either add the missing price tick(s) that produced the 450.01 high to the sample data table, or correct the candle high to match the data shown (e.g. 450.00). The explanation paragraph at lines 149-152 may also need updating depending on which values are corrected.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

| `fixed_rate@200ms` | `449.9968` |
| `fixed_rate@1000ms` | `449.995` |

The `fixed_rate@1000ms` channel (used by `pythdata.app`) never saw the
`450.00000` tick at `15:59:59.700 ET` because it fell between its 1-second
sampling points. This is expected behavior — different channels produce
different candle values.

---

### GET /\{channel\}/search
Expand Down
Loading