Payload Reference
Understand Pyth Pro payload structures, available properties, and binary formats
This page provides a comprehensive reference for understanding Pyth Pro payload structure, field specifications, and available data formats.
This reference is designed for both technical and non-technical stakeholders to understand Pyth Pro's data offering. For implementation details, see our integration guides for onchain integration, or subscribe to prices for offchain consumption via SDKs.
What is a Pyth Pro Payload?
A Pyth Pro payload is a real-time data update containing financial market information with cryptographic signatures for verification on blockchain. When you subscribe to Pyth Pro price feeds, you receive StreamUpdated messages containing this structured data.
Quick reference
| Property | Type | Scope | Description |
|---|---|---|---|
publisherCount | u16 | All | Number of contributing publishers. |
exponent | i16 | All | Decimal exponent: actual_price = mantissa × 10^exponent. |
marketSession | string | All | Session: regular, preMarket, postMarket, overNight, closed. |
price | i64 | Spot | Aggregate market price (mantissa). Use with exponent for actual price. |
confidence | i64 | Spot | Price uncertainty; higher = more disagreement. |
bestBidPrice | i64 | Spot | Highest bid across publishers. |
bestAskPrice | i64 | Spot | Lowest ask across publishers. |
fundingRate | i64 | Derivatives | Funding rate (perpetual futures). |
fundingTimestamp | u64 | Derivatives | When funding rate was last calculated (μs). |
fundingRateInterval | u64 | Derivatives | Interval between funding updates (μs). |
Scope: All = every feed type; Spot = spot price feeds; Derivatives = funding rate feeds.
Customizable Payload: The payload structure is customizable based on the properties you request in your subscription. Only the fields you specify will be included in the response. See Property Specifications for detailed information on each field.
Stream Response Structure
When you receive a StreamUpdated message from Pyth Pro, it contains the following structure:
| Field | Type |
|---|---|
type | string |
subscriptionId | number |
parsed | object |
timestampUs | string |
priceFeeds | array |
priceFeedId | u32 |
price | i64 |
bestBidPrice | i64 |
bestAskPrice | i64 |
publisherCount | u16 |
exponent | i16 |
confidence | i64 |
marketSession | string |
feedUpdateTimestamp | string |
evm | object |
encoding | string |
data | string |
{ "type": "streamUpdated", "subscriptionId": 1, "parsed": { "timestampUs": "1758690761750000", "priceFeeds": [ { "priceFeedId": 1, "price": "11223872331053", "bestBidPrice": "11222498842767", "bestAskPrice": "11224513591935", "publisherCount": 9, "exponent": -8, "confidence": 1373488286, "marketSession": "regular", "feedUpdateTimestamp": "1758690761750000" } ] }, "evm": { "encoding": "base64", "data": "0x..." } }
Property Specifications
Based on the protocol specification, here are the technical details for each property in a price feed.
Feed Structure
- Feed ID:
u32- Unique identifier for the price feed - Properties: Fields included based on your subscription request parameters
Core Price Properties
Main aggregate price calculated from all contributing publishers, represented as mantissa.
- Type
- optional non-zero i64
- Availability
- Only included if requested in subscription properties
- Invariants
- Non-zero when present (null values filtered out)
- Usage
- The price is stored in two parts: an integer mantissa value (the
pricefield) and a power-of-tenexponent. The actual decimal representation of the price is given by:decimal_price = price × 10^exponent. For example:1006900000000 × 10^(-8) = $10,069.00
Price Availability Semantics: In rare cases, the price field may be
absent from the response. This can only happen when a feed has been recently
activated and no price has ever been produced yet. Once a feed produces its
first valid price, a price will always be provided for that feed going
forward.
To determine when the price was generated, consumers must check
feedUpdateTimestamp:
- If
feedUpdateTimestampis equal to the update'stimestampUs, the price was generated as part of this update. - If
feedUpdateTimestampis earlier thantimestampUs, the price is the most recent available price, carried forward from the time indicated byfeedUpdateTimestamp, not generated at the current update time.
Consumers should always rely on feedUpdateTimestamp to understand the
freshness and origin of the price.
Market Depth Properties
Best bid and best ask represent the tightest prices across publishers. For a detailed comparison with confidence intervals, see Understanding Price Data.
Derivatives Properties
Available only for FundingRate feed types (perpetual futures contracts).
Subscription Channels
Pyth Pro offers multiple delivery channels to match your latency and frequency requirements:
| Channel | Description | Use Cases |
|---|---|---|
real_time | Updates sent immediately when new price is available (no faster than 1ms, no slower than 50ms) | High-frequency trading, real-time analytics |
fixed_rate@1ms | Updates every 1 millisecond | Ultra-low latency applications |
fixed_rate@50ms | Updates every 50 milliseconds | Low-latency trading systems |
fixed_rate@200ms | Updates every 200 milliseconds | Standard trading applications |
fixed_rate@1000ms | Updates every 1 second | General applications, dashboards |
Binary Formats & Signature Schemes
Pyth Pro provides multiple cryptographic formats to support different blockchain ecosystems. When you subscribe, you can request specific binary formats using the formats parameter.
| Format | Algorithm | Signature | Verification | Use | Best For |
|---|---|---|---|---|---|
evm | secp256k1 ECDSA | 65 bytes | Recoverable ECDSA | Onchain | Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche |
solana | Ed25519 EdDSA | 64 bytes | Direct Ed25519 | Onchain | Solana, Fogo, Ed25519-native chains |
leEcdsa | secp256k1 ECDSA (little-endian) | 65 bytes | Custom implementation | Onchain | Custom implementations, Little-endian chains |
leUnsigned | None | None | N/A | Offchain | Development, Testing, Analytics, Backend services |
How to Choose: Select the format based on your target blockchain's native
cryptographic primitives. The evm format works for all EVM chains, solana
for Ed25519-native chains, and leUnsigned for offchain applications that
don't need signature verification.