Oracle
Receive-only. Every frame carries an RFC 3339 timestamp (the
envelope serialization time) and a type tag, with the payload
fields flattened into the same object. Spot frames also carry Pyth’s
own publish_time so a consumer can measure freshness independently
of transport latency.
WSS
/
Messages
{
"type": "price",
"timestamp": "2026-09-09T14:03:12.417Z",
"symbol": "BTC",
"price": 113842.31,
"confidence": 41.27,
"publish_time": 1788012192,
"feed_id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
}{
"type": "twap_preview",
"timestamp": "2026-09-09T14:03:12.902Z",
"symbol": "BTC",
"twap": 113795.6642,
"sample_count": 188,
"coverage": 0.5222
}{
"type": "<string>",
"timestamp": "<string>"
}{
"type": "<string>",
"timestamp": "<string>"
}{
"type": "<string>",
"timestamp": "<string>",
"message": "<string>"
}{
"type": "<string>",
"timestamp": "<string>"
}Spot price
type:object
A Pyth spot price for one asset
TWAP preview
type:object
The running time-weighted average for the current settlement window
Upstream connected
type:object
The oracle's own Pyth connection is up
Upstream disconnected
type:object
The oracle lost its Pyth connection; prices pause until connected returns
Upstream error
type:object
A non-fatal error on the oracle's upstream feed
Heartbeat
type:object
Keepalive on a fixed interval; carries no data and needs no reply
Messages
{
"type": "price",
"timestamp": "2026-09-09T14:03:12.417Z",
"symbol": "BTC",
"price": 113842.31,
"confidence": 41.27,
"publish_time": 1788012192,
"feed_id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
}{
"type": "twap_preview",
"timestamp": "2026-09-09T14:03:12.902Z",
"symbol": "BTC",
"twap": 113795.6642,
"sample_count": 188,
"coverage": 0.5222
}{
"type": "<string>",
"timestamp": "<string>"
}{
"type": "<string>",
"timestamp": "<string>"
}{
"type": "<string>",
"timestamp": "<string>",
"message": "<string>"
}{
"type": "<string>",
"timestamp": "<string>"
}