REST API
Prices at a timestamp or over a range, OHLC candlesticks, symbols, and TradingView integration
The REST API serves prices at a timestamp or over a time window, OHLC candlesticks, and the symbol catalog. For signed price updates to verify on a blockchain, see Fetch Signed Price Updates.
Base URL
https://pyth.dourolabs.app/v1All {channel} path segments refer to a price channel (e.g. real_time, fixed_rate@200ms).
The /{channel}/... endpoints conform to the TradingView UDF
specification, allowing you to
connect TradingView charting UIs directly to this API.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /live | No | Health check |
| GET | /symbols | No | List available symbols |
| GET | /{channel}/price | Yes | Price at or after a timestamp |
| GET | /{channel}/price/range | Yes | Paginated prices over a time window |
| GET | /{channel}/history | Yes | OHLC candlestick data |
| GET | /{channel}/search | No | Search symbols |
| GET | /{channel}/symbols | No | Resolve a single symbol |
| GET | /{channel}/config | No | TradingView configuration |
| GET | /publisher_updates | Yes | Raw publisher updates |
GET /symbols
List all available price feed symbols, optionally filtered.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Text filter for symbol names |
asset_type | string | No | Filter by asset type: crypto, fx, equity, metal, rates, nav, commodity, funding-rate |
GET /{channel}/price
Returns price data at a specific historical timestamp, or the first price at or after it.
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ids | number[] | Yes | Price feed IDs | 1,2 |
timestamp | number | Yes | Unix timestamp in microseconds | 1704067200000000 |
split_adjusted | boolean | No | Scale prices computed before a stock split into post-split terms (default: false). See Split-adjusted prices | true |
mode | string | No | before or after (default: before). See Price before or after a timestamp | after |
lookahead_seconds | number | No | With mode=after, how far past timestamp to search, up to 86400 (default: 600) | 3600 |
Price before or after a timestamp
A price is computed whenever a feed updates, and feed_update_timestamp in
the response is the time of that update. A fixed-rate channel publishes on
every tick, so while a feed has no new update, for example when its market is
closed, each tick repeats the last price.
mode=before(the default) returns the price published exactly attimestamp, which is the last update at or before it. On a fixed-rate channel,timestampmust align with the channel interval; otherwise the response is an empty array.mode=afterreturns, for each feed, the first update at or aftertimestampthat carries a price.timestampdoes not need to align with the channel interval.
curl -H "Authorization: Bearer $PRO_API_KEY" \
"https://pyth.dourolabs.app/v1/fixed_rate@200ms/price?ids=1×tamp=1704067200000001&mode=after"mode=after searches lookahead_seconds forward from timestamp: 10 minutes
by default and at most 24 hours, or less when many feeds are requested. A feed
with no update in that window is left out of the response, so an empty array
means that no requested feed updated in the window. Match each returned price
to its feed by price_feed_id, not by its position in the array. To find the
first price after a market close, pass a lookahead_seconds long enough to
reach the next session, or repeat the request with a later timestamp.
lookahead_seconds without mode=after, a value above the maximum and an
unknown mode return 400.
GET /{channel}/price/range
Returns paginated price data for a set of feeds over a bounded time window.
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ids | number[] | Yes | Price feed IDs (max 100) | 1,2 |
start_timestamp | number | Yes | Window start, Unix timestamp in microseconds, inclusive | 1704067200000000 |
end_timestamp | number | Yes | Window end, Unix timestamp in microseconds, inclusive; the window may not exceed 60 seconds | 1704067260000000 |
limit | number | No | Max results per page, 1–1000 (default: 100) | 500 |
after | string | No | Opaque pagination cursor from a previous response's next field | |
split_adjusted | boolean | No | Scale prices computed before a stock split into post-split terms (default: false). See Split-adjusted prices | true |
Response Schema
| Field | Type | Description |
|---|---|---|
data | object[] | Price objects, one per feed and timestamp |
next | string | Opaque cursor, present only when another page exists |
Each data entry has the same shape as the GET /{channel}/price response:
channel, channel_name, price_feed_id, price, publish_time,
best_bid_price, best_ask_price, publisher_count, exponent,
confidence, funding_rate, funding_timestamp, funding_rate_interval,
market_session, ema_price, ema_confidence, feed_update_timestamp.
To fetch the next page, pass next verbatim as the after parameter of the
following request; stop when next is absent. Cursors are opaque and must not
be constructed by hand.
Errors
| Status | Cause |
|---|---|
400 | Invalid parameters, window longer than 60 seconds, or feed not ready/unavailable on the channel |
401 | Missing bearer token |
403 | Token not entitled to a requested feed |
404 | Unknown feed ID |
GET /{channel}/history
Returns OHLC candlestick data in TradingView format.
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
symbol | string | Yes | Trading pair symbol (case-insensitive) | Crypto.BTC/USD |
from | number | Yes | Start timestamp (Unix seconds) | 1704067200 |
to | number | Yes | End timestamp (Unix seconds) | 1704153600 |
resolution | string | Yes | Candle resolution (see below) | 60 |
split_adjusted | boolean | No | Scale prices computed before a stock split into post-split terms (default: false). See Split-adjusted prices | true |
Available Resolutions
| Resolution | Description |
|---|---|
1 | 1 minute |
2 | 2 minutes |
5 | 5 minutes |
15 | 15 minutes |
30 | 30 minutes |
60 | 1 hour |
120 | 2 hours |
240 | 4 hours |
360 | 6 hours |
720 | 12 hours |
D | 1 day |
W | 1 week |
M | 1 month |
Response Schema
| Field | Type | Description |
|---|---|---|
s | string | Status: ok or error |
t | number[] | Unix timestamps (seconds) |
o | number[] | Open prices |
h | number[] | High prices |
l | number[] | Low prices |
c | number[] | Close prices |
v | number[] | Volumes (if available) |
Arrays are aligned by index — t[0], o[0], h[0], l[0], c[0] represent the same candle.
GET /{channel}/search
Search for symbols by name and type.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search text |
type | string | Yes | Asset type filter |
exchange | string | Yes | Exchange name (default: "PYTH") |
limit | number | Yes | Max results (default: 15) |
GET /{channel}/symbols
Resolve a single symbol to its full configuration.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Symbol name (case-insensitive) |
GET /{channel}/config
Returns TradingView-compatible configuration including supported resolutions and data capabilities.
GET /publisher_updates
Returns raw publisher price updates. Requires authentication.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
price_feed_id | number[] | No | Filter by price feed IDs |
min_timestamp | string | No | ISO 8601 start time (default: 7 days ago) |
max_timestamp | string | No | ISO 8601 end time |
sort | string | Yes | "Ascending" or "Descending" |
limit | number | No | Max results, 1–10000 (default: 15) |
Authentication
GET /{channel}/price, GET /{channel}/price/range, and
GET /{channel}/history require API-key authentication. Pass your Pro API key
as a bearer token:
curl -H "Authorization: Bearer $PRO_API_KEY" \
"https://pyth.dourolabs.app/v1/fixed_rate@200ms/price?ids=1×tamp=1704067200000000"Do not embed your Pro API key in frontend or browser applications. The key
must stay server-side. Route requests through your own backend, which injects
the Authorization header before forwarding to this API.
For browser/frontend apps that cannot hold a secret, see Frontend Authentication.
See Acquire an API Key to obtain a key.
Split-adjusted prices
A stock split changes an equity's share price without changing its value. For
example, Netflix (Equity.US.NFLX/USD, feed ID 1304) traded near 110 after it.
GET /{channel}/price, GET /{channel}/price/range, and
GET /{channel}/history accept an optional split_adjusted query parameter.
It defaults to false, which returns prices as published. Set it to true to
scale every price computed before a split into post-split terms, so that
prices on both sides of the split are comparable:
curl -H "Authorization: Bearer $PRO_API_KEY" \
"https://pyth.dourolabs.app/v1/fixed_rate@200ms/history?symbol=Equity.US.NFLX/USD&resolution=D&from=1762992000&to=1763596800&split_adjusted=true"With split_adjusted=true, the 2025-11-13 daily candle opens at 115.75. With
the default, it opens at 1157.5.
The adjustment uses the confirmed and applied splits and reverse splits from Corporate Actions. A split takes effect at the start of the feed's pre-market session on its ex-date, or at the start of the regular session if the feed has no pre-market session. The parameter has no effect on feeds whose asset has no splits.
A price counts as computed before a split if its feed_update_timestamp, or
its publish_time when feed_update_timestamp is absent, is before the split.
A fixed-rate update published after a split can repeat a price computed before
it, and that price is adjusted.
The price, best_bid_price, best_ask_price, confidence, ema_price,
and ema_confidence fields are adjusted, as are the OHLC values from
GET /{channel}/history. The exponent is unchanged.
Each response from these endpoints carries a Pyth-Split-Version header. It
identifies the splits of the requested feeds that the adjustment used. It is
0 when split_adjusted is false or when no requested feed has a confirmed
and applied split. The value depends on which feeds you request, so compare it
only between requests for the same feeds. For such requests, the same non-zero
value means the same splits were applied. If the value changes, a new split
was applied and prices from earlier requests are no longer on the same scale:
fetch them again.
OpenAPI Schema
The full OpenAPI specification is available at:
Related
- Examples Repository
- Price Feed IDs - Symbol to ID mapping