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.
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"]
}'Create an account to get an API key and run this request.
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 usersAccess price feeds and updates through endpoints compatible with Hermes.
- getList price feeds
/hermes/v2/price_feeds - getGet a price feed
/hermes/v2/price_feeds/{id} - getGet latest price updates
/hermes/v2/updates/price/latest - getGet price updates at a timestamp
/hermes/v2/updates/price/{publish_time} - getGet price updates within a time interval
/hermes/v2/updates/price/{publish_time}/{interval}