Get API key
Historical prices

Get prices within a time range

gethttps://pyth.dourolabs.app/v1/{channel}/price/range

An API key or short-lived access token, in an Authorization: Bearer <token> header.

Returns prices for the requested feeds within a time range. Both boundaries are inclusive, and the range cannot exceed 60 seconds.

Results are paginated. To request the next page, pass the response's next value as the after parameter.

getv1/{channel}/price/range
curl "https://pyth.dourolabs.app/v1/real_time/price/range?ids=1&ids=2&start_timestamp=1758830400000000&end_timestamp=1758830401000000" \
  -H "Authorization: Bearer $PYTH_API_KEY"
Response
{
  "data": [
    {
      "channel": 1,
      "channel_name": "real_time",
      "price_feed_id": 1,
      "publish_time": 1758830400000000,
      "confidence": 1927180465,
      "exponent": -8,
      "market_session": "regular",
      "price": 10939852841644
    },
    {
      "channel": 1,
      "channel_name": "real_time",
      "price_feed_id": 2,
      "publish_time": 1758830400000000,
      "confidence": 101285480,
      "exponent": -8,
      "market_session": "regular",
      "price": 391287537937
    }
  ],
  "next": "WzE3NTg4MzA0MDAwMDAwMDAsMl0"
}

Path parameters

Replace the placeholders in the URL path with these values.

channelRequired

The channel that determines the update frequency.

Query parameters

Add these parameters to the URL query string.

idsinteger[]Required

IDs of the price feeds to retrieve. At most 100.

start_timestampstringRequired

Start of the time range, in Unix microseconds. This boundary is inclusive.

end_timestampstringRequired

End of the time range, in Unix microseconds. This boundary is inclusive. The range cannot exceed 60 seconds.

limitintegerOptional

Maximum number of price records per page. The default is 100 and the maximum 1,000.

afterstringOptional

Pagination token from the previous response's next field.

split_adjustedbooleanOptional

Scale prices published before a stock split into post-split terms. Defaults to false.

Response

200 · application/json

Returns a JSON object with the following fields.

dataobject[]

Price records returned on this page.

channelinteger

Numeric ID of the update channel.

channel_name

Name of the update channel.

  • real_time
  • fixed_rate@50ms
  • fixed_rate@200ms
  • fixed_rate@1000ms
price_feed_idinteger

Numeric ID of the price feed.

publish_timeinteger

Publication timestamp of the update, in Unix microseconds.

confidenceinteger | null

Confidence interval of the price, before applying exponent.

exponentinteger | null

Power of ten that scales the decimal fields: decimal value = mantissa * 10^exponent.

market_sessionstring | null

Market session of the feed update.

  • regular
  • preMarket
  • postMarket
  • overNight
  • closed
priceinteger | null

Price, before applying exponent. On funding-rate feeds, the funding price.

Show 9 more
best_ask_priceinteger | null

Best ask price, before applying exponent.

best_bid_priceinteger | null

Best bid price, before applying exponent.

ema_confidenceinteger | null

Exponential moving average of the confidence interval, before applying exponent.

ema_priceinteger | null

Exponential moving average of the price, before applying exponent.

feed_update_timestampinteger | null

Feed update timestamp, in Unix microseconds.

funding_rateinteger | null

Perpetual futures funding rate, before applying exponent.

funding_rate_intervalinteger | null

Time between funding rate updates, in microseconds.

funding_timestampinteger | null

Timestamp of the latest funding rate, in Unix microseconds.

publisher_countinteger | null

Number of publishers contributing to the update.

nextstring | null

Token to pass as after when requesting the next page. Omitted when no further page is available.

Errors

Status codes returned when a request fails.

400
The query parameters are invalid or a requested price feed is unavailable on this channel.
401
Authentication is missing.
403
The credentials do not grant access to a requested price feed.
404
The requested price feed was not found.