Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions pages/lazer/payload-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik
"publisherCount": 12,
"exponent": -8,
"confidence": 106965585
},
{
"priceFeedId": 3,
"price": null,
"bestBidPrice": null,
"bestAskPrice": null,
"publisherCount": 5,
"exponent": -8,
"confidence": null
}
]
},
Expand All @@ -87,6 +96,12 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik
}
```

<Callout type="info">
In the example above, the third price feed shows `"price": null`, indicating
that the price could not be computed. When you encounter null values, use the
last valid price or wait for the next update.
</Callout>

<Callout type="warning">
**Important**: The price is stored in two parts: an integer mantissa value
(the `price` field) and a power-of-ten `exponent`.
Expand Down Expand Up @@ -115,6 +130,15 @@ Main aggregate price calculated from all contributing publishers
- **Algorithm**: Refer to [price aggregation](../../price-feeds/how-pyth-works/price-aggregation) for the current algorithm
- **Invariants**: Non-zero when present (null values filtered out)

<Callout type="warning">
**Null Price Values**: In some cases, you may receive a `null` value for the
`price` field (shown as `"price": null` in JSON). This indicates that the
price could not be computed at that moment. When this occurs, you should
either use the last valid price you received or wait for a fresh update with a
valid price. Note that you may not always receive a price update in the
response if no valid price is available.
</Callout>

#### Data Publisher Count - `publisher_count`

Number of data publishers contributing to this price feed
Expand Down
Loading