From acd0b223b08b0995d917b2378123346349603d28 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 09:05:28 +0000 Subject: [PATCH 1/4] 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 --- pages/lazer/payload-reference.mdx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pages/lazer/payload-reference.mdx b/pages/lazer/payload-reference.mdx index e1834fe8..42e58908 100644 --- a/pages/lazer/payload-reference.mdx +++ b/pages/lazer/payload-reference.mdx @@ -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 } ] }, @@ -87,6 +96,12 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik } ``` + + 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. + + **Important**: The price is stored in two parts: an integer mantissa value (the `price` field) and a power-of-ten `exponent`. @@ -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) + + **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. + + #### Data Publisher Count - `publisher_count` Number of data publishers contributing to this price feed From 85c8a88cc1a4960cfe44d239d168b1ac603d3f38 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 09:07:56 +0000 Subject: [PATCH 2/4] fix: apply prettier formatting Co-Authored-By: Nidhi Singh --- pages/lazer/payload-reference.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/lazer/payload-reference.mdx b/pages/lazer/payload-reference.mdx index 42e58908..543c56e1 100644 --- a/pages/lazer/payload-reference.mdx +++ b/pages/lazer/payload-reference.mdx @@ -134,8 +134,8 @@ Main aggregate price calculated from all contributing publishers **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 + 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. From 0f9b6b594869c7f3a766b77a0de6a07c3754301d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 12:47:12 +0000 Subject: [PATCH 3/4] 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 --- pages/lazer/payload-reference.mdx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/pages/lazer/payload-reference.mdx b/pages/lazer/payload-reference.mdx index 543c56e1..2de97924 100644 --- a/pages/lazer/payload-reference.mdx +++ b/pages/lazer/payload-reference.mdx @@ -80,12 +80,8 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik }, { "priceFeedId": 3, - "price": null, - "bestBidPrice": null, - "bestAskPrice": null, "publisherCount": 5, - "exponent": -8, - "confidence": null + "exponent": -8 } ] }, @@ -97,9 +93,10 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik ``` - 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. + In the example above, the third price feed has the `price`, `bestBidPrice`, + `bestAskPrice`, and `confidence` fields absent, indicating that these values + could not be computed. When you encounter missing price fields, use the last + valid price or wait for the next update. @@ -131,12 +128,11 @@ Main aggregate price calculated from all contributing publishers - **Invariants**: Non-zero when present (null values filtered out) - **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. + **Missing Price Fields**: In some cases, the `price` field (and related + optional fields like `bestBidPrice`, `bestAskPrice`, and `confidence`) may be + absent from the response. 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. #### Data Publisher Count - `publisher_count` From 093d3ead32cebe4179d183f8b023cfee713874dd Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 12:52:32 +0000 Subject: [PATCH 4/4] 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 --- pages/lazer/payload-reference.mdx | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pages/lazer/payload-reference.mdx b/pages/lazer/payload-reference.mdx index 2de97924..d6b027e5 100644 --- a/pages/lazer/payload-reference.mdx +++ b/pages/lazer/payload-reference.mdx @@ -77,11 +77,6 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik "publisherCount": 12, "exponent": -8, "confidence": 106965585 - }, - { - "priceFeedId": 3, - "publisherCount": 5, - "exponent": -8 } ] }, @@ -92,13 +87,6 @@ Here's what a typical StreamUpdated response that contains a PriceFeed looks lik } ``` - - In the example above, the third price feed has the `price`, `bestBidPrice`, - `bestAskPrice`, and `confidence` fields absent, indicating that these values - could not be computed. When you encounter missing price fields, use the last - valid price or wait for the next update. - - **Important**: The price is stored in two parts: an integer mantissa value (the `price` field) and a power-of-ten `exponent`. @@ -128,11 +116,10 @@ Main aggregate price calculated from all contributing publishers - **Invariants**: Non-zero when present (null values filtered out) - **Missing Price Fields**: In some cases, the `price` field (and related - optional fields like `bestBidPrice`, `bestAskPrice`, and `confidence`) may be - absent from the response. 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. + **Missing Price Field**: In some cases, the `price` field may be absent from + the response. 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. #### Data Publisher Count - `publisher_count`