Developer Hub

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

PropertyTypeScopeDescription
publisherCountu16AllNumber of contributing publishers.
exponenti16AllDecimal exponent: actual_price = mantissa × 10^exponent.
marketSessionstringAllSession: regular, preMarket, postMarket, overNight, closed.
pricei64SpotAggregate market price (mantissa). Use with exponent for actual price.
confidencei64SpotPrice uncertainty; higher = more disagreement.
bestBidPricei64SpotHighest bid across publishers.
bestAskPricei64SpotLowest ask across publishers.
fundingRatei64DerivativesFunding rate (perpetual futures).
fundingTimestampu64DerivativesWhen funding rate was last calculated (μs).
fundingRateIntervalu64DerivativesInterval 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:

Hover over a field to highlight it
FieldType
typestring
subscriptionIdnumber
parsedobject
timestampUsstring
priceFeedsarray
priceFeedIdu32
pricei64
bestBidPricei64
bestAskPricei64
publisherCountu16
exponenti16
confidencei64
marketSessionstring
feedUpdateTimestampstring
evmobject
encodingstring
datastring
{
  "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 price field) and a power-of-ten exponent. 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 feedUpdateTimestamp is equal to the update's timestampUs, the price was generated as part of this update.
  • If feedUpdateTimestamp is earlier than timestampUs, the price is the most recent available price, carried forward from the time indicated by feedUpdateTimestamp, 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:

ChannelDescriptionUse Cases
real_timeUpdates sent immediately when new price is available (no faster than 1ms, no slower than 50ms)High-frequency trading, real-time analytics
fixed_rate@1msUpdates every 1 millisecondUltra-low latency applications
fixed_rate@50msUpdates every 50 millisecondsLow-latency trading systems
fixed_rate@200msUpdates every 200 millisecondsStandard trading applications
fixed_rate@1000msUpdates every 1 secondGeneral 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.

FormatAlgorithmSignatureVerificationUseBest For
evmsecp256k1 ECDSA65 bytesRecoverable ECDSAOnchain
Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche
solanaEd25519 EdDSA64 bytesDirect Ed25519Onchain
Solana, Fogo, Ed25519-native chains
leEcdsasecp256k1 ECDSA (little-endian)65 bytesCustom implementationOnchain
Custom implementations, Little-endian chains
leUnsignedNoneNoneN/AOffchain
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.

On this page