Get API key

API reference

Requests, responses and code samples for every Pyth Price Feeds endpoint and for corporate actions. Understanding price data explains confidence intervals and bid/ask prices.

Authenticate

Most endpoints require an API key.

REST
Authorization: Bearer <API_KEY> header.
Browser
A short-lived access token from POST /auth/token, created on a server so the API key stays there. The Hermes-compatible API accepts API keys only.
WebSocket
Header, subprotocol or query parameter. See Stream price updates.
No key
Listing and searching feeds, except with entitled_only=true.
Try it: Get latest prices
First request
curl "https://pyth-lazer.dourolabs.app/v1/latest_price" \
  -H "Authorization: Bearer $PYTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "fixed_rate@200ms",
    "formats": ["evm"],
    "priceFeedIds": [1],
    "properties": ["price", "exponent"]
  }'
Get an API key

Create an account to get an API key and run this request.

Get API key

Price feeds

Find available feeds and their IDs, symbols, and metadata.

Real-time prices

Stream price updates or request the latest available prices.

Historical prices

Retrieve prices at a timestamp, within a time range, or as open, high, low, and close (OHLC) bars.

On-chain updates

Retrieve signed price updates for on-chain verification. Reduce an update to the feeds a transaction needs.

Corporate actions

Find the asset a price feed prices and list its dividends, splits and other corporate actions. Overview

Hermes-compatible API

For existing Hermes users

Access price feeds and updates through endpoints compatible with Hermes.