Skip to content

Commit dbf9b1f

Browse files
docs: document that price field may be absent in Lazer payload reference (#905)
* docs: add documentation for null price values in Lazer payload reference - Added example JSON showing price field with null value - Added info callout explaining null price behavior - Added warning callout in Aggregate Market Price section - Documented that null indicates price could not be computed - Advised users to use last valid price or wait for fresh update Co-Authored-By: Nidhi Singh <[email protected]> * fix: apply prettier formatting Co-Authored-By: Nidhi Singh <[email protected]> * docs: update to show missing price fields as absent instead of null - Changed JSON example to show fields as absent rather than null - Updated callouts to reflect that fields are missing/absent - Clarified that price fields may be omitted from response when not computable Co-Authored-By: Nidhi Singh <[email protected]> * docs: simplify documentation - remove example and focus on price field only - Removed third price feed example from JSON - Removed info callout that explained the example - Simplified warning callout to only mention price field - Removed mention of related optional fields (bestBidPrice, bestAskPrice, confidence) Co-Authored-By: Nidhi Singh <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Nidhi Singh <[email protected]>
1 parent 2a9cd0a commit dbf9b1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pages/lazer/payload-reference.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ Main aggregate price calculated from all contributing publishers
115115
- **Algorithm**: Refer to [price aggregation](../../price-feeds/how-pyth-works/price-aggregation) for the current algorithm
116116
- **Invariants**: Non-zero when present (null values filtered out)
117117

118+
<Callout type="warning">
119+
**Missing Price Field**: In some cases, the `price` field may be absent from
120+
the response. This indicates that the price could not be computed at that
121+
moment. When this occurs, you should either use the last valid price you
122+
received or wait for a fresh update with a valid price.
123+
</Callout>
124+
118125
#### Data Publisher Count - `publisher_count`
119126

120127
Number of data publishers contributing to this price feed

0 commit comments

Comments
 (0)