Explorar o código

feat(dev-hub) Pyth Core migration last few pages

Aditya Arora hai 1 semana
pai
achega
e50c60c4c9
Modificáronse 33 ficheiros con 592 adicións e 87 borrados
  1. 3 3
      apps/developer-hub/content/docs/price-feeds/core/api-instances-and-providers/index.mdx
  2. 1 5
      apps/developer-hub/content/docs/price-feeds/core/api-instances-and-providers/meta.json
  3. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/aptos.mdx
  4. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/cosmwasm.mdx
  5. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/evm.mdx
  6. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/fuel.mdx
  7. 12 12
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/index.mdx
  8. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/iota.mdx
  9. 12 12
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/meta.json
  10. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/movement.mdx
  11. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/near.mdx
  12. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/pythnet.mdx
  13. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/solana.mdx
  14. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/starknet.mdx
  15. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/sui.mdx
  16. 2 2
      apps/developer-hub/content/docs/price-feeds/core/contract-addresses/ton.mdx
  17. 1 1
      apps/developer-hub/content/docs/price-feeds/core/error-codes/index.mdx
  18. 6 1
      apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/cross-chain.mdx
  19. 12 2
      apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/ema-price-aggregation.mdx
  20. 7 7
      apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/meta.json
  21. 42 7
      apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/price-aggregation.mdx
  22. 58 0
      apps/developer-hub/content/docs/price-feeds/core/pull-updates.mdx
  23. 95 0
      apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/account-structure.mdx
  24. 11 0
      apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/index.mdx
  25. 3 5
      apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/meta.json
  26. 127 0
      apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/product-metadata.mdx
  27. 108 0
      apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/schedule-format.mdx
  28. 9 0
      apps/developer-hub/content/docs/price-feeds/core/rate-limits.mdx
  29. 21 0
      apps/developer-hub/content/docs/price-feeds/core/why-update-prices.mdx
  30. 8 0
      apps/developer-hub/content/docs/price-feeds/meta.json
  31. BIN=BIN
      apps/developer-hub/public/images/Push-vs-Pull-Oracle.jpg
  32. 11 8
      apps/developer-hub/src/components/Pages/Homepage/index.tsx
  33. 21 0
      apps/developer-hub/src/components/Root/global.css

+ 3 - 3
apps/developer-hub/content/docs/price-feeds/core/api-instances-and-providers/index.mdx

@@ -7,6 +7,6 @@ slug: /price-feeds/core/api-instances-and-providers
 This documentation explains how to get access to API instances and providers for Pyth Price Feeds.
 See the following guides to learn more about how to access each service:
 
-- [Hermes](api-instances-and-providers/hermes.mdx)
-- [Pythnet RPC](api-instances-and-providers/pythnet-rpc.mdx)
-- [Benchmarks/Historical Price](api-instances-and-providers/benchmarks.mdx)
+- [Hermes](/price-feeds/core/api-instances-and-providers/hermes)
+- [Pythnet RPC](/price-feeds/core/api-instances-and-providers/pythnet-rpc)
+- [Benchmarks/Historical Price](/price-feeds/core/api-instances-and-providers/benchmarks)

+ 1 - 5
apps/developer-hub/content/docs/price-feeds/core/api-instances-and-providers/meta.json

@@ -1,7 +1,3 @@
 {
-  "pages": [
-    "[Hermes](./hermes)",
-    "[Benchmarks / Historical Prices](./benchmarks)",
-    "[Pythnet RPC](./pythnet-rpc)"
-  ]
+  "pages": ["hermes", "benchmarks", "pythnet-rpc"]
 }

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/aptos.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Aptos
-description: Find Pyth price feed contract addresses on Aptos networks
+title: on Aptos
+description: List of Pyth price feed contract addresses on Aptos networks
 slug: /price-feeds/core/contract-addresses/aptos
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/cosmwasm.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on CosmWasm Networks
-description: Find Pyth price feed contract addresses across CosmWasm ecosystems
+title: on CosmWasm
+description: List of Pyth price feed contract addresses on CosmWasm networks
 slug: /price-feeds/core/contract-addresses/cosmwasm
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/evm.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on EVM Networks
-description: Find Pyth price feed contract addresses on supported EVM mainnets and testnets
+title: on EVM Networks
+description: List of Pyth price feed contract addresses on supported EVM mainnets and testnets
 slug: /price-feeds/core/contract-addresses/evm
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/fuel.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Fuel
-description: Find Pyth price feed contract addresses on Fuel mainnet and testnet
+title: on Fuel
+description: List of Pyth price feed contract addresses on Fuel mainnet and testnet
 slug: /price-feeds/core/contract-addresses/fuel
 ---
 

+ 12 - 12
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/index.mdx

@@ -7,17 +7,17 @@ slug: /price-feeds/core/contract-addresses
 The following sections list the addresses of deployed Pyth Price Feed contracts across blockchains.
 The contracts are split by ecosystem into several different documents:
 
-- [EVM](./contract-addresses/evm)
-- [Solana/SVM](./contract-addresses/solana)
-- [Aptos](./contract-addresses/aptos)
-- [Sui](./contract-addresses/sui)
-- [IOTA](./contract-addresses/iota)
-- [Movement](./contract-addresses/movement)
-- [TON](./contract-addresses/ton)
-- [Fuel](./contract-addresses/fuel)
-- [CosmWasm](./contract-addresses/cosmwasm)
-- [NEAR](./contract-addresses/near)
-- [Starknet](./contract-addresses/starknet)
-- [Pythnet](./contract-addresses/pythnet)
+- [EVM](/price-feeds/core/contract-addresses/evm)
+- [Solana/SVM](/price-feeds/core/contract-addresses/solana)
+- [Aptos](/price-feeds/core/contract-addresses/aptos)
+- [Sui](/price-feeds/core/contract-addresses/sui)
+- [IOTA](/price-feeds/core/contract-addresses/iota)
+- [Movement](/price-feeds/core/contract-addresses/movement)
+- [TON](/price-feeds/core/contract-addresses/ton)
+- [Fuel](/price-feeds/core/contract-addresses/fuel)
+- [CosmWasm](/price-feeds/core/contract-addresses/cosmwasm)
+- [NEAR](/price-feeds/core/contract-addresses/near)
+- [Starknet](/price-feeds/core/contract-addresses/starknet)
+- [Pythnet](/price-feeds/core/contract-addresses/pythnet)
 
 Please see the relevant ecosystem document to find the Pyth contract address on your blockchain of choice.

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/iota.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on IOTA
-description: Find Pyth price feed contract addresses on IOTA networks
+title: on IOTA
+description: List of Pyth price feed contract addresses on IOTA networks
 slug: /price-feeds/core/contract-addresses/iota
 ---
 

+ 12 - 12
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/meta.json

@@ -1,16 +1,16 @@
 {
   "pages": [
-    "[EVM](./evm)",
-    "[Solana / SVM](./solana)",
-    "[Aptos](./aptos)",
-    "[Sui](./sui)",
-    "[IOTA](./iota)",
-    "[Movement](./movement)",
-    "[TON](./ton)",
-    "[Fuel](./fuel)",
-    "[CosmWasm](./cosmwasm)",
-    "[NEAR](./near)",
-    "[Starknet](./starknet)",
-    "[Pythnet](./pythnet)"
+    "evm",
+    "solana",
+    "aptos",
+    "sui",
+    "iota",
+    "movement",
+    "ton",
+    "fuel",
+    "cosmwasm",
+    "near",
+    "starknet",
+    "pythnet"
   ]
 }

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/movement.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Movement
-description: Find Pyth price feed contract addresses on Movement networks
+title: on Movement
+description: List of Pyth price feed contract addresses on Movement networks
 slug: /price-feeds/core/contract-addresses/movement
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/near.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on NEAR
-description: Find Pyth price feed contract addresses on NEAR networks
+title: on NEAR
+description: List of Pyth price feed contract addresses on NEAR networks
 slug: /price-feeds/core/contract-addresses/near
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/pythnet.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Pythnet
-description: Find Pyth price feed contract addresses on Pythnet
+title: on Pythnet
+description: List of Pyth price feed contract addresses on Pythnet
 slug: /price-feeds/core/contract-addresses/pythnet
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/solana.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Solana/SVM
-description: Find Pyth price feed contract addresses on Solana and other SVM chains
+title: on Solana/SVM
+description: List of Pyth price feed contract addresses on Solana and other SVM chains
 slug: /price-feeds/core/contract-addresses/solana
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/starknet.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Starknet
-description: Find Pyth price feed contract addresses on Starknet networks
+title: on Starknet
+description: List of Pyth price feed contract addresses on Starknet networks
 slug: /price-feeds/core/contract-addresses/starknet
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/sui.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on Sui
-description: Find Pyth price feed contract addresses on Sui networks
+title: on Sui
+description: List of Pyth price feed contract addresses on Sui networks
 slug: /price-feeds/core/contract-addresses/sui
 ---
 

+ 2 - 2
apps/developer-hub/content/docs/price-feeds/core/contract-addresses/ton.mdx

@@ -1,6 +1,6 @@
 ---
-title: Price Feed Contract Addresses on TON
-description: Find Pyth price feed contract addresses on TON networks
+title: on TON
+description: List of Pyth price feed contract addresses on TON networks
 slug: /price-feeds/core/contract-addresses/ton
 ---
 

+ 1 - 1
apps/developer-hub/content/docs/price-feeds/core/error-codes/index.mdx

@@ -4,4 +4,4 @@ description: Directory of error code references for Pyth price feeds
 slug: /price-feeds/core/error-codes
 ---
 
-- [EVM](error-codes/evm)
+- [EVM](/price-feeds/core/error-codes/evm)

+ 6 - 1
apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/cross-chain.mdx

@@ -7,7 +7,12 @@ slug: /price-feeds/core/how-pyth-works/cross-chain
 Pyth uses a cross-chain mechanism to transfer prices from [Pythnet](pythnet) to target chains. The diagram below
 shows how prices are delivered from Pythnet to target chains:
 
-![Pyth cross-chain architecture](/images/Pull-Architecture-Hermes.png)
+<figure className="image-container">
+  <img
+    src="/images/Pull-Architecture-Hermes.png"
+    alt="Pyth cross-chain architecture"
+  />
+</figure>
 
 Data providers publish their prices on Pythnet. The on-chain [oracle program](oracle-program) then aggregates prices
 for a feed to obtain the aggregate price and confidence. Next, the Pythnet validators send a Wormhole message on each

+ 12 - 2
apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/ema-price-aggregation.mdx

@@ -27,7 +27,12 @@ price_account .. CqFJLrT4rSpA46RQkVYWn8tdBDuQ7p7RXcp6Um76oaph
 
 In an EMA the most recent samples receive the most weight, and samples further back in time get exponentially less weight the farther in the past they are. For a 1 hour EMA, the samples 1 hour in the past get 50% of the weighting, samples 2 hours in the past get 25% of the weighting, 3 hours in the past get 12.5% of the weighting, etc.
 
-![EMA price aggregation example 1](/images/EMA_Price_Aggregation_1.png)
+<figure className="image-container">
+  <img
+    src="/images/EMA_Price_Aggregation_1.png"
+    alt="EMA price aggregation example 1"
+  />
+</figure>
 
 While conceptually not as simple as an SMA (Simple Moving Average), the EMA has a particularly simple implementation for streaming applications such as Pyth. The exponential weighting method allows the entire history of prices and weights to be represented by a single number.
 
@@ -42,6 +47,11 @@ The current Pyth averaging method is a slot-weighted, inverse confidence-weighte
 - **Slot weighted** — The Pyth EMA uses the Pythnet slot number to measure the passage of time. The averaging period is 5921 slots, which corresponds to approximately 1 hour on Pythnet.
 - **Inverse confidence weighted** — Weighting each sample by 1/Confidence lets the EMA give more weight to samples with tight confidence and ignore samples with very wide confidence. Below is an example of an outlier aggregate price with a wide confidence interval. Notice how the average using inverse confidence weighting does not get pulled up by the outlier sample while the uniform weighted average does.
 
-![EMA price aggregation example 2](/images/EMA_Price_Aggregation_2.png)
+<figure className="image-container">
+  <img
+    src="/images/EMA_Price_Aggregation_2.png"
+    alt="EMA price aggregation example 2"
+  />
+</figure>
 
 For more details and explanations, be sure to read the dedicated blog post on this topic [here](https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1).

+ 7 - 7
apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/meta.json

@@ -1,11 +1,11 @@
 {
   "pages": [
-    "[Pythnet](./pythnet)",
-    "[Oracle Program](./oracle-program)",
-    "[Cross-chain](./cross-chain)",
-    "[Fees](./fees)",
-    "[Hermes](./hermes)",
-    "[Price Aggregation](./price-aggregation)",
-    "[EMA Price Aggregation](./ema-price-aggregation)"
+    "pythnet",
+    "oracle-program",
+    "cross-chain",
+    "fees",
+    "hermes",
+    "price-aggregation",
+    "ema-price-aggregation"
   ]
 }

+ 42 - 7
apps/developer-hub/content/docs/price-feeds/core/how-pyth-works/price-aggregation.mdx

@@ -10,11 +10,21 @@ Price aggregation combines the prices and confidences submitted by individual da
 
 The aggregation algorithm is designed to achieve 3 properties. First, it must be **robust to manipulation.** If most publishers are submitting a price of \$100 and one publisher submits a price of \$80, the aggregate price should remain near \$100 and not be overly influenced by the single outlying price. In the figure below, the aggregate price and confidence interval (represented by the blue star) is not influenced by the magenta publisher whose price is far away from the other publishers:
 
-![Price aggregation example 1](/images/Price_Aggregation_1.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_1.png"
+    alt="Price aggregation example with an outlier"
+  />
+</figure>
 
 Second, the **aggregate price should appropriately weight data sources with different levels of accuracy.** Pyth allows publishers to submit a confidence interval because they have varying levels of accuracy in observing the price of a product. This property can result in situations where one publisher reports a price of \$101 +/- 1, and another reports \$110 +/- 10. In these cases, aggregating the price to be closer to \$101 than \$110 is appropriate, as in the figure below.
 
-![Price aggregation example 2](/images/Price_Aggregation_2.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_2.png"
+    alt="Price aggregation example showing weighting by accuracy"
+  />
+</figure>
 
 Finally, the **aggregate confidence interval should reflect the variation between publishers' prices.**
 Under normal market conditions, it is reasonable to expect a product to trade at a similar price across exchanges.
@@ -22,7 +32,12 @@ In these cases, aggregate confidence interval is preferable to reflect the confi
 However, in some rare situations, a product can trade at different prices on different exchanges.
 In these cases, the aggregate confidence interval should widen out to reflect the variation between these prices, as shown in the figure on the right.
 
-![Price aggregation example 3](/images/Price_Aggregation_3.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_3.png"
+    alt="Price aggregation example illustrating confidence width"
+  />
+</figure>
 
 **Algorithm**
 
@@ -45,21 +60,41 @@ Finally, the bold red star depicts the aggregate price and the bold red line dep
 In the first scenario, one publisher with a tight confidence interval is an outlier.
 Although this publisher does influence the objective function (the red line is lower on the left side than the right), it does not have enough influence to affect either the aggregate price or confidence interval.
 
-![Price aggregation example 4](/images/Price_Aggregation_4.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_4.png"
+    alt="Aggregation scenario with an outlier"
+  />
+</figure>
 
 The second scenario depicts how publishers with tighter confidence intervals can exert more influence over the location of the aggregate price, as long as their prices are consistent with the confidence intervals of other publishers.
 
-![Price aggregation example 5](/images/Price_Aggregation_5.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_5.png"
+    alt="Aggregation scenario with higher weights for tighter confidence"
+  />
+</figure>
 
 The third scenario demonstrates the typical case where there are many publishers whose prices and confidence intervals roughly agree.
 In this case, the desired behavior is for the aggregate price and confidence to reflect those of the individual publishers.
 
-![Price aggregation example 6](/images/Price_Aggregation_6.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_6.png"
+    alt="Aggregation scenario with consistent publishers"
+  />
+</figure>
 
 Finally, the fourth scenario considers the case where the publishers publish distinct prices with non-overlapping confidence intervals.
 In this case, the confidence interval widens out because the dispersion between publishers creates a large gap between the aggregate price and the 25th/75th percentiles of the votes.
 
-![Price aggregation example 7](/images/Price_Aggregation_7.png)
+<figure className="image-container">
+  <img
+    src="/images/Price_Aggregation_7.png"
+    alt="Aggregation scenario with divergent publisher prices"
+  />
+</figure>
 
 **Further Reading**
 

+ 58 - 0
apps/developer-hub/content/docs/price-feeds/core/pull-updates.mdx

@@ -0,0 +1,58 @@
+---
+title: What is a Pull Oracle?
+description: Learn how Pyth's pull oracle model differs from traditional push oracles
+slug: /price-feeds/core/pull-updates
+---
+
+Most oracles today are push oracles where the oracle operator is responsible for submitting price updates to the blockchain.
+Pyth is different: it is a _pull oracle_ where anyone can permissionlessly update the on-chain price.
+This document explains the differences between push and pull oracles.
+
+## Push Oracles
+
+_Push oracles_ periodically update an on-chain price based on external trigger conditions.
+The oracle has a smart contract that stores the current price.
+The contract also has a set of permissioned operators who are authorized to update the price.
+The oracle operators then commit to updating the on-chain price at a specific cadence, for example, once every 30 minutes or if the price moves by 1%.
+Thus, in a push oracle, the on-chain price is periodically updated, regardless of whether or not anyone is using it.
+
+## Pull Oracles
+
+In contrast to push oracles, _pull oracles_ only update the on-chain price when requested.
+There are different ways for users to request an updated price from a pull oracle.
+Some pull oracles respond to on-chain requests: applications send one transaction to request data from the oracle, which then submits the response in a second transaction.
+Pyth uses a simpler system where users can request the latest price update from an off-chain service.
+Anyone can submit a price update to the on-chain Pyth contract, which verifies its authenticity and stores it for later use.
+This system allows applications to use a single transaction flow that first updates the price then performs the necessary application logic.
+
+For a more in-depth explanation on the differences between push and pull oracles, refer to the following video tutorial:
+[How to Build with Pyth's Pull Oracle Design: Pyth Tutorials](https://youtu.be/qdwrs23Qc9g)
+
+## Comparing Push and Pull
+
+![](/images/Push-vs-Pull-Oracle.jpg)
+
+Push and pull oracles differ on a number of important dimensions:
+
+- **Update frequency** -- In a push oracle, every price feed updates at a fixed update frequency.
+  The oracle operator determines the frequency, but it typically ranges from every 10 minutes to 1 hour.
+  In contrast, pull oracles can update at a much higher frequency.
+  For example, every Pyth price feed updates every 400 milliseconds.
+- **Latency** -- An oracle's update frequency also affects its prices' latency.
+  The higher update frequencies of pull oracles allow applications to access lower-latency data.
+- **Blockchain support** -- Pull oracles support a wide variety of different blockchains.
+  Push oracles typically support a smaller number of blockchains, as each additional chain requires ongoing gas expenditures.
+- **Price feed selection** -- Similar to the item above, pull oracles also support a wide selection of price feeds.
+  In contrast, push oracles typically have a more limited selection.
+  Push oracles generally cannot support a wide selection of feeds due to the gas cost of periodically updating each feed.
+
+A fundamental reason for these differences is that push oracles incur gas costs for price updates.
+These gas costs limit their scalability across all of the dimensions above.
+
+### Integration Differences
+
+Push oracles and pull oracles require applications to integrate in different ways.
+With a push oracle, applications typically read the current price out of a smart contract.
+Since the push oracle periodically updates the price, the application can assume the data in the smart contract is (reasonably) fresh.
+With a pull oracle, applications need to update the on-chain price before reading it.
+Developers using Pyth can refer to [How to Use Real-Time Price Data](/price-feeds/use-real-time-data) to learn how to perform these steps.

+ 95 - 0
apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/account-structure.mdx

@@ -0,0 +1,95 @@
+---
+title: Account Structure
+description: Understand the layout of Pyth mapping, product, and price accounts
+slug: /price-feeds/core/pythnet-reference/account-structure
+---
+
+The Pyth oracle program manages a number of on-chain accounts. There are three different types of accounts:
+
+1. _Product accounts_ store metadata about a product, such as its symbol (e.g., "BTC/USD") and asset type.
+2. _Price accounts_ store the current price information for a particular product. This account has fields such as the current price, a confidence interval, an exponential moving average price, an exponential moving average confidence interval and whether or not a price is currently available.
+3. _Mapping accounts_ serve as a listing of other accounts. The mapping accounts are organized into a linked list whose values are the set of product accounts. These accounts allow applications to enumerate the full list of products whose prices are available on Pyth.&#x20;
+
+The [Pyth Rust SDK](https://github.com/pyth-network/pyth-sdk-rs) contains a sample application that prints the current content of all Pyth accounts. The following sections use the output of this application to better understand the content of these accounts.
+
+**Product Accounts**
+
+Product accounts store metadata about a product. This metadata is represented as a set of reference attributes, stored as a list of text key/value pairs. Not all product accounts follow the same structure; for a comprehensive overview, visit the [Product Metadata page](./product-metadata). For example, the product account for AAPL contains the following fields:
+
+```sh copy
+product_account .. G89jkM5wFLpmnbvRbeePUumxsJyzoXaRfgBVjyx2CPzQ
+  symbol.......... Equity.US.AAPL/USD
+  asset_type...... Equity
+  quote_currency.. USD
+  description..... APPLE INC
+  base............ AAPL
+  country......... US
+  cms_symbol...... AAPL
+  cqs_symbol...... AAPL
+  nasdaq_symbol... AAPL
+  price_account... CqFJLrT4rSpA46RQkVYWn8tdBDuQ7p7RXcp6Um76oaph
+```
+
+This snippet shows the reference attributes for AAPL. The set of available reference attributes depends on the `asset_type`. Every product account has `symbol` , `asset_type`, `quote_currency` , and `price_account` . US equity products additionally include additional reference symbology that is useful for mapping Pyth products to other industry-standard identifiers. The product account also contains a pointer to a price account that contains the product's current pricing information.&#x20;
+
+As another example, here is the product account for BTC/USD:
+
+```sh copy
+product_account .. 3m1y5h2uv7EQL3KaJZehvAJa4yDNvgc5yAdL9KPMKwvk
+  symbol.......... Crypto.BTC/USD
+  asset_type...... Crypto
+  quote_currency.. USD
+  description..... BTC/USD
+  generic_symbol.. BTCUSD
+  base............ BTC
+  price_account .. HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J
+```
+
+**Price Accounts**
+
+Price accounts store the current price of a product along with additional useful information. For example, consider the following content of AAPL's price account:&#x20;
+
+```sh copy
+price_account .. CqFJLrT4rSpA46RQkVYWn8tdBDuQ7p7RXcp6Um76oaph
+    price ........ 16297000 x 10^-5
+    conf ......... 27952 x 10^-5
+    price_type ... price
+    exponent ..... -5
+    status ....... trading
+    corp_act ..... nocorpact
+    num_qt ....... 2
+    valid_slot ... 110430111
+    publish_slot . 110430112
+    ema_price ......... 16247409 x 10^-5
+    ema_confidence ......... 19415 x 10^-5
+```
+
+This account stores the current price in a fixed-point format. The price is computed by taking the `price` field and multiplying by `10^exponent`. The account also includes a confidence interval that represents Pyth's uncertainty about the current price. This confidence interval can be interpreted as the standard deviation of a Laplace distribution centered around the price. `conf` is also stored in the same fixed-point format. In the example above, the price is 12276250, the conf is 1500 and the exponent is -5. These values translate into a price of \$122.76250 +- 0.015.
+
+Price accounts include several other useful fields. First, each account has a `status` that indicates whether or not the price is valid. Pricing information for a product can be unavailable for various reasons, for example, US equity markets only trade during certain hours. The status field indicates whether or not Pyth currently has a price for the product. **Only prices with a value of `status=trading` should be used**. If the status is not `trading` but is Unknown, Halted or Auction the Pyth price can be an arbitrary value.
+
+**Mapping Accounts**
+
+Mapping accounts serve as an index of the pricing information currently available on Pyth. These accounts are organized into a linked list whose values are product accounts. Applications can traverse this linked list to enumerate all products currently available on Pyth.
+
+The on-chain relationship between different account types is as follows:
+
+```
+  -------------        -------------       -------------
+  |           |1      m|           |       |           |
+  |  mapping  |------->|  product  |------>|   price   |
+  |           |        |           |       |           |
+  -------------        -------------       -------------
+        |
+        V
+  -------------
+  |           |
+  |  mapping  |
+  |           |
+  -------------
+        |
+        V
+       ...
+```
+
+Each mapping account contains a list of product account ids, plus an optional pointer to the subsequent mapping account. Each product account in turn points to the price account that stores the current price information for that product.&#x20;

+ 11 - 0
apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/index.mdx

@@ -0,0 +1,11 @@
+---
+title: Pythnet Reference
+description: Reference material for Pythnet accounts, product metadata, and schedule formats
+slug: /price-feeds/core/pythnet-reference
+---
+
+Refer to the following resources for deeper details about the data structures used on Pythnet:
+
+- [Account Structure](/price-feeds/core/pythnet-reference/account-structure)
+- [Product Metadata](/price-feeds/core/pythnet-reference/product-metadata)
+- [Schedule Format](/price-feeds/core/pythnet-reference/schedule-format)

+ 3 - 5
apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/meta.json

@@ -1,7 +1,5 @@
 {
-  "pages": [
-    "[Account Structure](./account-structure)",
-    "[Product Metadata](./product-metadata)",
-    "[Schedule Format](./schedule-format)"
-  ]
+  "title": "Pythnet Reference",
+  "pages": ["account-structure", "product-metadata", "schedule-format"],
+  "defaultOpen": false
 }

+ 127 - 0
apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/product-metadata.mdx

@@ -0,0 +1,127 @@
+---
+title: Product Metadata
+description: Review the standard fields stored in Pyth product accounts by asset type
+slug: /price-feeds/core/pythnet-reference/product-metadata
+---
+
+Product accounts store metadata about a product. This metadata is represented as a set of reference attributes, stored as a list of text key/value pairs but not all products share the same account structure. Metadata is network dependent.
+
+Every product has `product_account`, `symbol`, `asset_type`, `quote_currency`, `base` and `price_account`. However, the remaining fields of a product account will depend on its `asset_type`.
+
+**Equity**
+
+As a rule, all products with `asset_type` = Equity will follow the below Product Account structure:
+
+```sh copy
+product_account... Solana Account
+  asset_type...... AssetType
+  base............ BaseCurrency
+  cms_symbol...... NYSESymbol
+  cqs_symbol...... SIPSSymbol
+  country......... Country
+  description..... Description
+  nasdaq_symbol... ComstockSymbol
+  quote_currency.. QuoteCurrency
+  symbol.......... AssetType.Country.BaseCurrency/QuoteCurrency
+  weekly_schedule. WeeklySchedule
+  price_account... Solana Account
+```
+
+`symbol`: AssetType.Country.BaseCurrency/QuoteCurrency where the `base`: BaseCurrency is, in order of availability:&#x20;
+
+1. `cms_symbol`: NYSESymbol&#x20;
+2. `cqs_symbol`: SIPSSymbol
+3. `nasdaq_symbol`: ComstockSymbol
+
+Here is a snapshot of the Apple product account on Pythnet:
+
+```sh copy
+product_account .. 3mkwqdkawySvAm1VjD4f2THN5mmXzb76fvft2hWpAANo
+  asset_type...... Equity
+  base............ AAPL
+  cms_symbol...... AAPL
+  cqs_symbol...... AAPL
+  country......... US
+  description..... APPLE INC / US DOLLAR
+  nasdaq_symbol... AAPL
+  quote_currency.. USD
+  symbol.......... Equity.US.AAPL/USD
+  weekly_schedule. America/New_York,9:30-16:00,9:30-16:00,9:30-16:00,9:30-16:00,9:30-16:00,C,C
+  price_account... 5yixRcKtcs5BZ1K2FsLFwmES1MyA92d6efvijjVevQCw
+```
+
+**Crypto**
+
+As a rule, all products with `asset_type` = Crypto will follow the below Product Account structure:
+
+```sh copy
+product_account .. Solana Account
+  asset_type...... AssetType
+  base............ BaseCurrency
+  description..... Description
+  generic_symbol.. JLQDSymbol
+  quote_currency.. QuoteCurrency
+  symbol.......... AssetType.BaseCurrency/QuoteCurrency
+  weekly_schedule. WeeklySchedule
+  price_account .. Solana Account
+```
+
+Here is a snapshot of the Ethereum product account on Pythnet:
+
+```sh copy
+product_account .. EMkxjGC1CQ7JLiutDbfYb7UKb3zm9SJcUmr1YicBsdpZ
+  asset_type...... Crypto
+  base............ ETH
+  description..... ETHEREUM / US DOLLAR
+  generic_symbol.. ETHUSD
+  quote_currency.. USD
+  symbol.......... Crypto.ETH/USD
+  weekly_schedule. America/New_York,O,O,O,O,O,O,O
+  price_account .. JBu1AL4obBcCMqKBBxhpWCNUt136ijcuMZLFvTP7iWdB
+```
+
+**Foreign Currency & Metal**
+
+Lastly, are Foreign Currencies (FX) and Metal assets. Those 2 `asset_type` share a common product account structure that follows the below template:
+
+```sh copy
+product_account .. Solana Account
+  asset_type...... AssetType
+  base............ BaseCurrency
+  description..... Description
+  generic_symbol.. JLQDSymbol
+  quote_currency.. QuoteCurrency
+  symbol.......... AssetType.BaseCurrency/QuoteCurrency
+  tenor........... Maturity
+  weekly_schedule. WeeklySchedule
+  price_account .. Solana Account
+```
+
+Here is a snapshot of the Japanese Yen product account on Pythnet:
+
+```sh copy
+product_account .. eAnmHaCS2J1XPEb6zohWFrnXD3Mni3wTrfKGhkoQmcZ
+  asset_type...... FX
+  base............ USD
+  description..... US DOLLAR / JAPANESE YEN
+  generic_symbol.. USDJPY
+  quote_currency.. JPY
+  symbol.......... FX.USD/JPY
+  tenor........... Spot
+  weekly_schedule. America/New_York,O,O,O,O,00:00-17:00,C,17:00-24:00
+  price_account .. H6dt83FavYgfJR8oV7HewKWZjzveFFiDhq41VbmDYnVF
+```
+
+**Other Fields**
+
+- `weekly_schedule` - Optional field. When set, contents are used by publishers to learn about a symbol's typical market hours. See [Weekly Schedule Format](schedule-format#weekly-schedule-format-deprecated) for a detailed format specification.
+
+**Best Practices**
+
+The users should not rely on the symbol name being unchanging or parse data out of the symbol.
+
+Instead, programs should always use the different attributes to identify the product you are interested in. You have to ensure that anything which is used to compose the symbol is made available as a stand-alone attribute.
+
+**Caveats**
+
+There is a limit of 464 bytes to store the attribute dictionary in v2 (the product account is 512 bytes and 48 are used for other fields). This has to hold all the keys and values, plus field separators. There is no data compression or abbreviation.

+ 108 - 0
apps/developer-hub/content/docs/price-feeds/core/pythnet-reference/schedule-format.mdx

@@ -0,0 +1,108 @@
+---
+title: Schedule Format
+description: Learn how the Pyth schedule field governs market hours for publishing
+slug: /price-feeds/core/pythnet-reference/schedule-format
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+
+This document describes the format for the `schedule` field in Pyth product metadata.
+The `schedule` field defines a product's market hours, including its timezone, weekly schedule, and any holiday exceptions.
+It controls the publishing schedule of `pyth-agent`, restricting it to follow a predetermined timetable.
+This field is particularly useful for:
+
+- FX
+- Metals
+- Stocks
+
+## Format
+
+```plain
+Timezone;WeeklySchedule;Holidays
+```
+
+**If `schedule` is omitted for a symbol, pyth-agent will revert to the deprecated [`weekly_schedule`](#weekly-schedule-format-deprecated) field.
+If `weekly_schedule` is also undefined, pyth-agent will default to 24/7 publishing, which was the standard behavior prior to this feature.**
+
+**Detailed Definitions**
+
+- `Timezone` - A human-readable tz database TZ identifier of the market’s local timezone, such as `America/New_York`.
+  **Full list of identifiers can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)**.
+  <Callout type="info">
+    Daylight-saving time is automatically handled by the pyth-agent.
+  </Callout>
+- `WeeklySchedule` - A list of seven comma-separated `DaySchedule` entries that define the recurring weekly schedule of a product’s market hours.
+  Each `DaySchedule` entry corresponds to a day of the week, starting from Monday.
+  None of the comma-separated values can be omitted.
+- `Holidays` - A list of comma-separated `MonthDay/DaySchedule` entries.
+  Each entry specifies the schedule for a specific day of the year, overriding the `WeeklySchedule` for that date.
+  This list can be empty. `MonthDay` is a compact date format where the first two digits represent the month (01 for January, 12 for December),
+  and the last two digits represent the day of the month (e.g., `0415` for April 15th). **Leading zeros are mandatory**.
+- `DaySchedule` - A single day’s schedule. `DaySchedule` can be one of the following:
+
+  - `O` for all-day open
+  - `C` for all-day closed
+  - `HourMinute-HourMinute[&HourMinute-HourMinute[&...]]` for specific open and close times in the market-local timezone.
+    The hour and minute are combined into a single 4-digit number, where the first two digits represent the hour (00 to 24),
+    and the last two digits represent the minute (00 to 59).
+    For example, `0415` represents 4:15 AM. The open time must precede the close time, and the range is inclusive.
+
+    - `24` can only be used to specify `2400`, which represents the final moment of a given day.
+      - Context: Without this special case, the next best thing would be `2359` which could cause a symbol to go down between `2359` and the next day’s `0000` for a full minute.
+    - **Leading zeros are mandatory**.
+
+    If there are multiple open and close times per day (e.g., maintenance window) you can specify them by using `&` in between. For instance `0000-1200&1300-2400` means that the
+    market is open all day except between 12:00 and 13:00.
+
+**Examples**
+
+- `Europe/Lisbon;O,O,O,O,O,C,C;` - 24h open from Monday to Friday, according to Lisbon’s perspective of midnight. Closed on Saturdays and Sundays.
+- `America/New_York;0930-1630,0930-1630,0930-1630,0930-1630,0930-1630,C,C;` - Open 9:30AM - 4:30PM ET (EDT or EST)
+  from Monday to Friday. Closed outside specified ranges, on Saturdays and on Sundays. Based off real-life NASDAQ hours.
+- `Israel;0959-1714,0959-1714,0959-1714,0959-1714,C,C,0959-1539;` - Interesting edge case of the Tel-Aviv Stock Exchange. Open with reduced hours on Sundays, closed on Friday and Saturday. Note the slash-less timezone name.
+- `Africa/Johannesburg;C,C,C,C,C,C,C;` - Trivial made-up example. The market is not trading on any day - exact opposite of 24/7 trading. Pyth-agent instances observing this value will not publish the product at any time. Note: The timezone has no effect in this case.
+- `Europe/London;O,O,O,O,O,O,O;` - Trivial example. The market is open at all times and the timezone has no effect. Equivalent to default 24/7 behavior when `schedule` and `weekly_schedule` is not specified on a symbol.
+- `America/New_York;O,O,O,O,O,C,C;1224/0930-1300,1225/C` - An example of specifying holidays. The market closes early on Christmas Eve and is fully closed on Christmas Day.
+- `America/New_York;C,C,C,C,0930-1530&1830-2200,C,C;` - Only open Friday between 9:30AM - 3:30PM and 6:30PM - 10:00PM ET (EDT or EST)
+
+## Weekly Schedule Format (Deprecated)
+
+<Callout type="warning">
+  This field is deprecated in favor of `schedule`.
+</Callout>
+
+This document outlines the rules for specifying contents of a new Pyth product metadata field - `weekly_schedule` . The field specifies the recurring weekly schedule of a product’s market hours. It serves as a reference for `pyth-agent` to stop publishing outside the hours specified in the schedule. Notable use cases include:
+
+- FX
+- Metals
+- Stocks
+
+## Format
+
+```plain
+Timezone,MHKind,MHKind,MHKind,MHKind,MHKind,MHKind,MHKind
+```
+
+**Note: None of the comma-separated values can be ommitted - exactly one timezone and seven subsequent per-day schedules are required. That said, ommitting `weekly_schedule` on a symbol is allowed and will cause pyth-agent to default to 24/7 publishing (the usual behavior before this feature)**
+
+**Detailed Definitions**
+
+- `Timezone` - A human-readable tz database TZ identifier of the market’s local timezone - e.g. `America/New_York`. **Full list of identifiers can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)**. Notes:
+  - Daylight-saving time - Handled automatically by pyth-agent code dealing with the format.
+- `MHKind` - A single week day’s schedule. The `MHKind` values describe week days from Monday to Sunday, in that order. `MHKind` is defined as one of:
+  - `O` - all-day open
+  - `C` - all-day closed
+  - `Hour:Minute-Hour:Minute` - specific open and close times in the market-local timezone. Open time must come before close time. **The range is inclusive.** Definitions:
+    - `Hour` - number of hours from `00` to `24` . Notes:
+      - Leading zeros are optional - e.g. `9` and `09`, `0` and `00` are equivalent.
+      - `24` can only be used to specify `24:00`. This value is used to express the final moment of a given day (split-second before `00:00` on the next day). Context: Without this special case, the next best thing would be `23:59` which could cause a symbol to go down between `23:59` and the next day’s `00:00` for a full minute.
+    - `Minute` - number of minutes from `00` to `59`. Notes:
+      - Leading zeros are **mandatory** - e.g. `9:05`, `9:00`, `15:07`
+
+**Examples**
+
+- `Europe/Lisbon,O,O,O,O,O,C,C` - 24h open from Monday to Friday, according to Lisbon’s perspective of midnight. Closed on Saturdays and Sundays.
+- `America/New_York,9:30-16:30,9:30-16:30,9:30-16:30,9:30-16:30,9:30-16:30,C,C` - Open 9:30AM - 4:30PM ET (EDT or EST) from Monday to Friday. Closed outside specified ranges, on Saturdays and on Sundays. Based off real-life NASDAQ hours.
+- `Israel,9:59-17:14,9:59-17:14,9:59-17:14,9:59-17:14,C,C,9:59-15:39` - Interesting edge case of the Tel-Aviv Stock Exchange. Open with reduced hours on Sundays, closed on Friday and Saturday. Note the slash-less timezone name.
+- `Africa/Johannesburg,C,C,C,C,C,C,C` - Trivial made-up example. The market is not trading on any day - exact opposite of 24/7 trading. Pyth-agent instances observing this value will not publish the product at any time. Note: The timezone has no effect in this case.
+- `Europe/London,O,O,O,O,O,O,O` - Trivial example. The market is open at all times and the timezone has no effect. Equivalent to default 24/7 behavior when `weekly_schedule` is not specified on a symbol.

+ 9 - 0
apps/developer-hub/content/docs/price-feeds/core/rate-limits.mdx

@@ -0,0 +1,9 @@
+---
+title: Rate Limits
+description: Rate Limits for the Pyth Hermes and Benchmarks APIs
+slug: /price-feeds/core/rate-limits
+---
+
+In order to maximize the reliability of the Pyth Hermes and Benchmarks APIs, a request rate limit is enforced. All endpoints limits are set at **30 requests every 10 seconds per IP address**.
+
+**One exception**: the TradingView endpoint will allow 90 requests every 10 seconds. Clients issuing request above the limit will receive a 429 (Too Many Requests) response for the subsequent 60-second period.

+ 21 - 0
apps/developer-hub/content/docs/price-feeds/core/why-update-prices.mdx

@@ -0,0 +1,21 @@
+---
+title: Why Update Prices
+description: Understand why Pyth pull-oracle integrations must refresh on-chain prices
+slug: /price-feeds/core/why-update-prices
+---
+
+Pyth uses a pull oracle model. Unlike traditional push oracles that automatically update prices on-chain at regular intervals, Pyth requires users to explicitly update the on-chain price before reading it.
+
+This design offers several advantages:
+
+- **Lower costs**: You only pay for price updates when you need them
+- **Lower latency**: You can fetch the latest price update directly from Pyth's low-latency oracle network and submit it on-chain immediately
+- **Flexibility**: Different applications can update prices at different frequencies based on their needs
+
+In the pull integration pattern, your contract must:
+
+1. Accept `priceUpdate` data from the caller (fetched from [Hermes](./how-pyth-works/hermes))
+2. Call `updatePriceFeeds()` to submit this data on-chain before reading prices
+3. Pay a small fee for each update (calculated via `getUpdateFee()`)
+
+If you don't update the price or if the on-chain price becomes too stale, calls to `getPriceNoOlderThan()` will revert with a `StalePrice` error. See [how to fetch price updates](./fetch-price-updates) for more details on obtaining price updates.

+ 8 - 0
apps/developer-hub/content/docs/price-feeds/meta.json

@@ -0,0 +1,8 @@
+{
+  "root": true,
+  "title": "Price Feeds",
+  "description": "Real-time financial market data",
+  "pages": ["core", "pro"],
+  "defaultOpen": true,
+  "icon": "ChartLine"
+}

BIN=BIN
apps/developer-hub/public/images/Push-vs-Pull-Oracle.jpg


+ 11 - 8
apps/developer-hub/src/components/Pages/Homepage/index.tsx

@@ -26,16 +26,16 @@ export const Homepage = () => {
           quickLinks={[
             {
               label: "Getting Started",
-              href: "/price-feeds/v1/getting-started",
+              href: "/price-feeds/core",
             },
-            { label: "API Reference", href: "/openapi/hermes" },
+            { label: "API Reference", href: "/price-feeds/core/api-reference" },
             {
               label: "Contract Addresses",
-              href: "/price-feeds/v1/contract-addresses",
+              href: "/price-feeds/core/contract-addresses",
             },
           ]}
           buttonLabel="Get started"
-          buttonHref="/price-feeds/v1"
+          buttonHref="/price-feeds/core"
         />
         <ProductCard
           title="Pyth Pro"
@@ -55,13 +55,16 @@ export const Homepage = () => {
           quickLinks={[
             {
               label: "Get Pyth Pro Access Token",
-              href: "/price-feeds/v2/acquire-an-access-token",
+              href: "/price-feeds/pro/access-token",
             },
-            { label: "Browse Supported Feeds", href: "/price-feeds" },
-            { label: "Error Codes", href: "/price-feeds" },
+            {
+              label: "Browse Supported Feeds",
+              href: "/price-feeds/pro/price-feeds",
+            },
+            { label: "Error Codes", href: "/price-feeds/pro/error-codes" },
           ]}
           buttonLabel="Get started"
-          buttonHref="/price-feeds"
+          buttonHref="/price-feeds/pro"
         />
         <ProductCard
           title="Entropy"

+ 21 - 0
apps/developer-hub/src/components/Root/global.css

@@ -1,3 +1,24 @@
+.image-container {
+  display: flex;
+  justify-content: center;
+  border: 1px solid var(--color-gray-200, #e5e7eb);
+  background-color: var(--color-gray-50, #f9fafb);
+  border-radius: 12px;
+  padding: 24px;
+  margin: 24px 0;
+}
+
+.image-container img {
+  max-width: 100%;
+  height: auto;
+}
+
+@media (prefers-color-scheme: dark) {
+  .image-container {
+    border-color: var(--color-gray-800, #1f2937);
+    background-color: var(--color-gray-900, #111827);
+  }
+}
 @import "tailwindcss";
 @import "fumadocs-ui/css/neutral.css";
 @import "fumadocs-ui/css/preset.css";