diff --git a/components/LazerPriceIdTable.tsx b/components/LazerPriceIdTable.tsx index b54a9813..30aeaf82 100644 --- a/components/LazerPriceIdTable.tsx +++ b/components/LazerPriceIdTable.tsx @@ -94,7 +94,7 @@ const LoadedLazerPriceIdTable = ({
Description Name Symbol - Pyth Lazer Id + Pyth Pro Id Exponent diff --git a/components/icons/ProductIcons.tsx b/components/icons/ProductIcons.tsx index 7e8f755e..84585138 100644 --- a/components/icons/ProductIcons.tsx +++ b/components/icons/ProductIcons.tsx @@ -9,6 +9,11 @@ import { Clock, ArrowsOutCardinal, DiceSixIcon, + ListBullets, + Key, + Play, + BookOpen, + MoneyWavy, } from "@phosphor-icons/react"; export function BarChartIcon() { @@ -46,3 +51,23 @@ export function MultiChainIcon() { export function DiceIcon() { return ; } + +export function ListIcon() { + return ; +} + +export function KeyIcon() { + return ; +} + +export function PlayIcon() { + return ; +} + +export function BookIcon() { + return ; +} + +export function MoneyWavyIcon() { + return ; +} diff --git a/next.config.js b/next.config.js index 99fa6d84..5d9a79bc 100644 --- a/next.config.js +++ b/next.config.js @@ -118,6 +118,21 @@ const permanentRedirectArray = [ "/home/oracle-integrity-staking/reward-examples", ], ["/guides", "/price-feeds"], + + // Lazer (top-level) to Pyth Pro Redirects - MUST come before general price-feeds redirects + ["/lazer", "/price-feeds/pro"], + ["/lazer/:path*", "/price-feeds/pro/:path*"], + + // Explicitly map legacy lazer paths under /price-feeds to Pro - MUST come before general price-feeds redirects + ["/price-feeds/lazer", "/price-feeds/pro"], + ["/price-feeds/lazer/:path*", "/price-feeds/pro/:path*"], + // some other price feed redirects + ["/price-feeds/sponsored-feeds", "/price-feeds/push-feeds"], + [ + "/price-feeds/use-real-time-data/:path((?!pull-integration(?:/|$)).*)", + "/price-feeds/use-real-time-data/pull-integration/:path", + ], + ["/benchmarks", "/price-feeds/use-historic-price-data"], [ "/benchmarks/how-to-create-tradingview-charts", @@ -125,13 +140,6 @@ const permanentRedirectArray = [ ], ["/benchmarks/api-instances", "/price-feeds/api-reference/"], ["/benchmarks/rate-limits", "/price-feeds/rate-limits/"], - - ["/price-feeds/sponsored-feeds", "/price-feeds/push-feeds"], - - [ - "/price-feeds/use-real-time-data/:path((?!pull-integration(?:/|$)).*)", - "/price-feeds/use-real-time-data/pull-integration/:path", - ], ]; /** @type {import('next').NextConfig} */ diff --git a/pages/_meta.json b/pages/_meta.json index e04bd346..7b67e27e 100644 --- a/pages/_meta.json +++ b/pages/_meta.json @@ -9,11 +9,6 @@ "type": "page" }, - "lazer": { - "title": "Lazer", - "type": "page" - }, - "express-relay": { "title": "Express Relay", "type": "page" diff --git a/pages/home/_meta.json b/pages/home/_meta.json index 8ca4ed81..501786d8 100644 --- a/pages/home/_meta.json +++ b/pages/home/_meta.json @@ -11,11 +11,6 @@ "href": "/price-feeds" }, - "Lazer": { - "title": "Lazer →", - "href": "/lazer" - }, - "Express Relay": { "title": "Express Relay →", "href": "/express-relay" diff --git a/pages/home/index.mdx b/pages/home/index.mdx index f78a0120..10617c18 100644 --- a/pages/home/index.mdx +++ b/pages/home/index.mdx @@ -33,20 +33,6 @@ Pyth Network is the leading oracle protocol that connects the owners of market d {" "} -} - title="Lazer" - description="High-performance, low-latency price feeds for institutional applications." - features={[ - { icon: , text: "Ultra-low latency" }, - { icon: , text: "Institutional grade" }, - { icon: , text: "High-frequency data" }, - ]} - ctaText="Learn About Lazer" - href="../lazer" -/> - {" "} 1,000-byte proofs and complex signature verification. | **100-byte proofs** and simple signature verification. | -| **Integration Process** | Open and permissionless integration for any Web3 or Web2 protocol. | **Specialized** and **permissioned** solution for protocols prioritizing performance over some elements of decentralization. | diff --git a/pages/lazer/integrate-as-consumer.mdx b/pages/lazer/integrate-as-consumer.mdx deleted file mode 100644 index d40a2a37..00000000 --- a/pages/lazer/integrate-as-consumer.mdx +++ /dev/null @@ -1,11 +0,0 @@ -# How to Integrate Pyth Lazer as a Consumer - -The following guides demonstrate how to integrate Pyth Lazer as a consumer in your application. - -Lazer is available in Solana, Fogo, and EVM. Please consult the following guides to get started: - -- [Solana and Fogo](integrate-as-consumer/svm) -- [EVM](integrate-as-consumer/evm) - -Lazer price feeds can also be used in off-chain applications. See the -[subscription guide](subscribe-price-updates) and the [Terms of Service](https://bafybeih2re4eaun3nzt5dyyc2bnjprw44kligacriftm24dfrjfik4ocv4.ipfs.w3s.link/250129-terms-of-service-pyth-lazer-final.pdf) for more information. diff --git a/pages/lazer/integrate-as-publisher.mdx b/pages/lazer/integrate-as-publisher.mdx deleted file mode 100644 index 25784d01..00000000 --- a/pages/lazer/integrate-as-publisher.mdx +++ /dev/null @@ -1,3 +0,0 @@ -# How to Integrate Pyth Lazer as a Publisher - -We are working on this guide. Please check back later or contact us here if you wish to publish data on Pyth Lazer. diff --git a/pages/lazer/price-feed-ids.mdx b/pages/lazer/price-feed-ids.mdx deleted file mode 100644 index 9ac2fb3a..00000000 --- a/pages/lazer/price-feed-ids.mdx +++ /dev/null @@ -1,5 +0,0 @@ -import { LazerPriceIdTable } from "../../components/LazerPriceIdTable"; - -# Lazer Price Feeds - - diff --git a/pages/price-feeds/_meta.json b/pages/price-feeds/_meta.json index 6d4ec639..88cab9b4 100644 --- a/pages/price-feeds/_meta.json +++ b/pages/price-feeds/_meta.json @@ -1,65 +1,17 @@ { - "documentation-home": { + "price": { "title": "← Documentation Home", "href": "/home" }, - - "-- Price Feeds": { - "title": "Price Feeds", - "type": "separator" + "index": { + "title": "Introduction" }, - "index": "Introduction", - "getting-started": "Getting Started", - - "-- Tutorials": { - "title": "Tutorials", - "type": "separator" + "pro": { + "title": "Pyth Pro →", + "href": "/pro" }, - - "create-your-first-pyth-app": "Create Your First Pyth App", - - "-- How-to Guides": { - "title": "How-To Guides", - "type": "separator" - }, - - "use-real-time-data": "Use Real-Time Price Data", - "use-historic-price-data": "Use Historic Price Data", - "fetch-price-updates": "Fetch Price Updates", - "schedule-price-updates": "Schedule Price Updates", - "create-tradingview-charts": "Create TradingView Charts", - "derive-cross-rate": "Derive Cross Rate", - "migrate-an-app-to-pyth": "Migrate an App to Pyth", - "use-pyth-for-morpho": "Use Pyth for Morpho Markets", - "publish-data": "Publish Data", - "troubleshoot": "Troubleshoot Errors", - - "-- Reference Material": { - "title": "Reference Material", - "type": "separator" - }, - - "api-reference": "API Reference", - "price-feeds": "Price Feeds", - "current-fees": "Current Fees", - "push-feeds": "Push Feeds", - "market-hours": "Market Hours", - "best-practices": "Best Practices", - "error-codes": "Error Codes", - "api-instances-and-providers": "API Instances and Providers", - "contract-addresses": "Contract Addresses", - "pythnet-reference": "Pythnet Reference", - - "examples": { - "title": "Example Applications ↗", - "href": "https://github.com/pyth-network/pyth-examples/tree/main/price_feeds" - }, - "-- Understand Pyth": { - "title": "Understanding Pyth", - "type": "separator" - }, - - "pull-updates": "What is a Pull Oracle?", - "why-update-prices": "Why Update Prices", - "how-pyth-works": "How Pyth Works" + "core": { + "title": "Pyth Core →", + "href": "/core" + } } diff --git a/pages/price-feeds/core/_meta.json b/pages/price-feeds/core/_meta.json new file mode 100644 index 00000000..8ec00776 --- /dev/null +++ b/pages/price-feeds/core/_meta.json @@ -0,0 +1,56 @@ +{ + "index": "Introduction", + "getting-started": "Getting Started", + + "-- Tutorials": { + "title": "Tutorials", + "type": "separator" + }, + + "create-your-first-pyth-app": "Create Your First Pyth App", + + "-- How-to Guides": { + "title": "How-To Guides", + "type": "separator" + }, + + "use-real-time-data": "Use Real-Time Price Data", + "use-historic-price-data": "Use Historic Price Data", + "fetch-price-updates": "Fetch Price Updates", + "schedule-price-updates": "Schedule Price Updates", + "create-tradingview-charts": "Create TradingView Charts", + "derive-cross-rate": "Derive Cross Rate", + "migrate-an-app-to-pyth": "Migrate an App to Pyth", + "use-pyth-for-morpho": "Use Pyth for Morpho Markets", + "publish-data": "Publish Data", + "troubleshoot": "Troubleshoot Errors", + + "-- Reference Material": { + "title": "Reference Material", + "type": "separator" + }, + + "api-reference": "API Reference", + "price-feeds": "Price Feeds", + "current-fees": "Current Fees", + "push-feeds": "Push Feeds", + "market-hours": "Market Hours", + "best-practices": "Best Practices", + "error-codes": "Error Codes", + "api-instances-and-providers": "API Instances and Providers", + "contract-addresses": "Contract Addresses", + "pythnet-reference": "Pythnet Reference", + + "examples": { + "title": "Example Applications ↗", + "href": "https://github.com/pyth-network/pyth-examples/tree/main/price_feeds" + }, + "-- Understand Pyth": { + "title": "Understanding Pyth", + "type": "separator" + }, + + "pull-updates": "What is a Pull Oracle?", + "why-update-prices": "Why Update Prices", + "how-pyth-works": "How Pyth Works" +} diff --git a/pages/price-feeds/api-instances-and-providers.mdx b/pages/price-feeds/core/api-instances-and-providers.mdx similarity index 100% rename from pages/price-feeds/api-instances-and-providers.mdx rename to pages/price-feeds/core/api-instances-and-providers.mdx diff --git a/pages/price-feeds/api-instances-and-providers/_meta.json b/pages/price-feeds/core/api-instances-and-providers/_meta.json similarity index 100% rename from pages/price-feeds/api-instances-and-providers/_meta.json rename to pages/price-feeds/core/api-instances-and-providers/_meta.json diff --git a/pages/price-feeds/api-instances-and-providers/benchmarks.mdx b/pages/price-feeds/core/api-instances-and-providers/benchmarks.mdx similarity index 100% rename from pages/price-feeds/api-instances-and-providers/benchmarks.mdx rename to pages/price-feeds/core/api-instances-and-providers/benchmarks.mdx diff --git a/pages/price-feeds/api-instances-and-providers/hermes.mdx b/pages/price-feeds/core/api-instances-and-providers/hermes.mdx similarity index 100% rename from pages/price-feeds/api-instances-and-providers/hermes.mdx rename to pages/price-feeds/core/api-instances-and-providers/hermes.mdx diff --git a/pages/price-feeds/api-instances-and-providers/pythnet-rpc.mdx b/pages/price-feeds/core/api-instances-and-providers/pythnet-rpc.mdx similarity index 100% rename from pages/price-feeds/api-instances-and-providers/pythnet-rpc.mdx rename to pages/price-feeds/core/api-instances-and-providers/pythnet-rpc.mdx diff --git a/pages/price-feeds/api-reference.mdx b/pages/price-feeds/core/api-reference.mdx similarity index 100% rename from pages/price-feeds/api-reference.mdx rename to pages/price-feeds/core/api-reference.mdx diff --git a/pages/price-feeds/api-reference/_meta.json b/pages/price-feeds/core/api-reference/_meta.json similarity index 100% rename from pages/price-feeds/api-reference/_meta.json rename to pages/price-feeds/core/api-reference/_meta.json diff --git a/pages/price-feeds/best-practices.mdx b/pages/price-feeds/core/best-practices.mdx similarity index 100% rename from pages/price-feeds/best-practices.mdx rename to pages/price-feeds/core/best-practices.mdx diff --git a/pages/price-feeds/contract-addresses.mdx b/pages/price-feeds/core/contract-addresses.mdx similarity index 100% rename from pages/price-feeds/contract-addresses.mdx rename to pages/price-feeds/core/contract-addresses.mdx diff --git a/pages/price-feeds/contract-addresses/_meta.json b/pages/price-feeds/core/contract-addresses/_meta.json similarity index 100% rename from pages/price-feeds/contract-addresses/_meta.json rename to pages/price-feeds/core/contract-addresses/_meta.json diff --git a/pages/price-feeds/contract-addresses/aptos.mdx b/pages/price-feeds/core/contract-addresses/aptos.mdx similarity index 95% rename from pages/price-feeds/contract-addresses/aptos.mdx rename to pages/price-feeds/core/contract-addresses/aptos.mdx index 08abeb47..83767632 100644 --- a/pages/price-feeds/contract-addresses/aptos.mdx +++ b/pages/price-feeds/core/contract-addresses/aptos.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Price Feed Contract Addresses on Aptos diff --git a/pages/price-feeds/contract-addresses/cosmwasm.mdx b/pages/price-feeds/core/contract-addresses/cosmwasm.mdx similarity index 100% rename from pages/price-feeds/contract-addresses/cosmwasm.mdx rename to pages/price-feeds/core/contract-addresses/cosmwasm.mdx diff --git a/pages/price-feeds/contract-addresses/evm.mdx b/pages/price-feeds/core/contract-addresses/evm.mdx similarity index 99% rename from pages/price-feeds/contract-addresses/evm.mdx rename to pages/price-feeds/core/contract-addresses/evm.mdx index 464e1da2..81041226 100644 --- a/pages/price-feeds/contract-addresses/evm.mdx +++ b/pages/price-feeds/core/contract-addresses/evm.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Price Feed Contract Addresses on EVM Networks diff --git a/pages/price-feeds/contract-addresses/fuel.mdx b/pages/price-feeds/core/contract-addresses/fuel.mdx similarity index 94% rename from pages/price-feeds/contract-addresses/fuel.mdx rename to pages/price-feeds/core/contract-addresses/fuel.mdx index 59712071..eb63860a 100644 --- a/pages/price-feeds/contract-addresses/fuel.mdx +++ b/pages/price-feeds/core/contract-addresses/fuel.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Price Feed Contract Addresses on Fuel diff --git a/pages/price-feeds/contract-addresses/iota.mdx b/pages/price-feeds/core/contract-addresses/iota.mdx similarity index 100% rename from pages/price-feeds/contract-addresses/iota.mdx rename to pages/price-feeds/core/contract-addresses/iota.mdx diff --git a/pages/price-feeds/contract-addresses/movement.mdx b/pages/price-feeds/core/contract-addresses/movement.mdx similarity index 95% rename from pages/price-feeds/contract-addresses/movement.mdx rename to pages/price-feeds/core/contract-addresses/movement.mdx index 9a3ca79d..c32b04c8 100644 --- a/pages/price-feeds/contract-addresses/movement.mdx +++ b/pages/price-feeds/core/contract-addresses/movement.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Price Feed Contract Addresses on Movement diff --git a/pages/price-feeds/contract-addresses/near.mdx b/pages/price-feeds/core/contract-addresses/near.mdx similarity index 100% rename from pages/price-feeds/contract-addresses/near.mdx rename to pages/price-feeds/core/contract-addresses/near.mdx diff --git a/pages/price-feeds/contract-addresses/pythnet.mdx b/pages/price-feeds/core/contract-addresses/pythnet.mdx similarity index 100% rename from pages/price-feeds/contract-addresses/pythnet.mdx rename to pages/price-feeds/core/contract-addresses/pythnet.mdx diff --git a/pages/price-feeds/contract-addresses/solana.mdx b/pages/price-feeds/core/contract-addresses/solana.mdx similarity index 99% rename from pages/price-feeds/contract-addresses/solana.mdx rename to pages/price-feeds/core/contract-addresses/solana.mdx index b06fc523..79248873 100644 --- a/pages/price-feeds/contract-addresses/solana.mdx +++ b/pages/price-feeds/core/contract-addresses/solana.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Program Addresses on Solana and other SVM chains diff --git a/pages/price-feeds/contract-addresses/starknet.mdx b/pages/price-feeds/core/contract-addresses/starknet.mdx similarity index 94% rename from pages/price-feeds/contract-addresses/starknet.mdx rename to pages/price-feeds/core/contract-addresses/starknet.mdx index 61399f69..a26f8bd0 100644 --- a/pages/price-feeds/contract-addresses/starknet.mdx +++ b/pages/price-feeds/core/contract-addresses/starknet.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Price Feed Contract Addresses on Starknet diff --git a/pages/price-feeds/contract-addresses/sui.mdx b/pages/price-feeds/core/contract-addresses/sui.mdx similarity index 100% rename from pages/price-feeds/contract-addresses/sui.mdx rename to pages/price-feeds/core/contract-addresses/sui.mdx diff --git a/pages/price-feeds/contract-addresses/ton.mdx b/pages/price-feeds/core/contract-addresses/ton.mdx similarity index 95% rename from pages/price-feeds/contract-addresses/ton.mdx rename to pages/price-feeds/core/contract-addresses/ton.mdx index 10d92a7c..b97a2664 100644 --- a/pages/price-feeds/contract-addresses/ton.mdx +++ b/pages/price-feeds/core/contract-addresses/ton.mdx @@ -1,4 +1,4 @@ -import CopyAddress from "../../../components/CopyAddress"; +import CopyAddress from "../../../../components/CopyAddress"; # Price Feed Contract Addresses on TON diff --git a/pages/price-feeds/create-tradingview-charts.mdx b/pages/price-feeds/core/create-tradingview-charts.mdx similarity index 100% rename from pages/price-feeds/create-tradingview-charts.mdx rename to pages/price-feeds/core/create-tradingview-charts.mdx diff --git a/pages/price-feeds/create-your-first-pyth-app.mdx b/pages/price-feeds/core/create-your-first-pyth-app.mdx similarity index 100% rename from pages/price-feeds/create-your-first-pyth-app.mdx rename to pages/price-feeds/core/create-your-first-pyth-app.mdx diff --git a/pages/price-feeds/create-your-first-pyth-app/_meta.json b/pages/price-feeds/core/create-your-first-pyth-app/_meta.json similarity index 100% rename from pages/price-feeds/create-your-first-pyth-app/_meta.json rename to pages/price-feeds/core/create-your-first-pyth-app/_meta.json diff --git a/pages/price-feeds/create-your-first-pyth-app/evm/_meta.json b/pages/price-feeds/core/create-your-first-pyth-app/evm/_meta.json similarity index 100% rename from pages/price-feeds/create-your-first-pyth-app/evm/_meta.json rename to pages/price-feeds/core/create-your-first-pyth-app/evm/_meta.json diff --git a/pages/price-feeds/create-your-first-pyth-app/evm/part-1.mdx b/pages/price-feeds/core/create-your-first-pyth-app/evm/part-1.mdx similarity index 98% rename from pages/price-feeds/create-your-first-pyth-app/evm/part-1.mdx rename to pages/price-feeds/core/create-your-first-pyth-app/evm/part-1.mdx index 2321aaad..fe9fc195 100644 --- a/pages/price-feeds/create-your-first-pyth-app/evm/part-1.mdx +++ b/pages/price-feeds/core/create-your-first-pyth-app/evm/part-1.mdx @@ -68,7 +68,7 @@ rm -r src/* test/* scripts/* ### Install the Pyth SDK Pyth provides a Solidity SDK that can be used to interact with one-chain Pyth Price Feed contracts. -It exposes multiple [methods](/price-feeds/api-reference/evm) to read and interact with the contracts. +It exposes multiple [methods](/price-feeds/core/api-reference/evm) to read and interact with the contracts. Use `npm` to add the Pyth SDK: @@ -336,7 +336,7 @@ contract MyFirstPythContract { ``` The end of this function calls the `mint` function we defined before. -Before that, however, the function calls [`updatePriceFeeds`](../../api-reference/evm/updatePriceFeeds) on the Pyth contract. +Before that, however, the function calls [`updatePriceFeeds`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds) on the Pyth contract. This function takes a payload of `bytes[]` that is passed into the function itself. The Pyth contract requires a fee to perform this update; the code snippet above calculates the needed fee using [`getUpdateFee`](https://api-reference.pyth.network/price-feeds/evm/getUpdateFee). The caller of this function can pass in a recent Pyth price update as this payload, guaranteeing that the `StalePrice` error won't occur. diff --git a/pages/price-feeds/create-your-first-pyth-app/evm/part-2.mdx b/pages/price-feeds/core/create-your-first-pyth-app/evm/part-2.mdx similarity index 99% rename from pages/price-feeds/create-your-first-pyth-app/evm/part-2.mdx rename to pages/price-feeds/core/create-your-first-pyth-app/evm/part-2.mdx index cc643bb5..d1bebdd0 100644 --- a/pages/price-feeds/create-your-first-pyth-app/evm/part-2.mdx +++ b/pages/price-feeds/core/create-your-first-pyth-app/evm/part-2.mdx @@ -51,7 +51,7 @@ Paste the address from the command above into the faucet to get your ETH. You can verify that the ETH has arrived in your wallet by running the command `cast balance $ADDRESS -r $RPC_URL -e` The final step before deploying is to get the arguments for the contract's constructor: -the [Pyth contract address](https://docs.pyth.network/price-feeds/contract-addresses/evm#testnets) for Optimism Sepolia +the [Pyth contract address](https://docs.pyth.network/price-feeds/core/contract-addresses/evm#testnets) for Optimism Sepolia and the [price feed id](https://docs.pyth.network/price-feeds/price-feeds) for ETH/USD. We will also export these values as environment variables for convenience: diff --git a/pages/price-feeds/current-fees.mdx b/pages/price-feeds/core/current-fees.mdx similarity index 100% rename from pages/price-feeds/current-fees.mdx rename to pages/price-feeds/core/current-fees.mdx diff --git a/pages/price-feeds/derive-cross-rate.mdx b/pages/price-feeds/core/derive-cross-rate.mdx similarity index 100% rename from pages/price-feeds/derive-cross-rate.mdx rename to pages/price-feeds/core/derive-cross-rate.mdx diff --git a/pages/price-feeds/error-codes.mdx b/pages/price-feeds/core/error-codes.mdx similarity index 100% rename from pages/price-feeds/error-codes.mdx rename to pages/price-feeds/core/error-codes.mdx diff --git a/pages/price-feeds/error-codes/_meta.json b/pages/price-feeds/core/error-codes/_meta.json similarity index 100% rename from pages/price-feeds/error-codes/_meta.json rename to pages/price-feeds/core/error-codes/_meta.json diff --git a/pages/price-feeds/error-codes/evm.mdx b/pages/price-feeds/core/error-codes/evm.mdx similarity index 100% rename from pages/price-feeds/error-codes/evm.mdx rename to pages/price-feeds/core/error-codes/evm.mdx diff --git a/pages/price-feeds/fetch-price-updates.mdx b/pages/price-feeds/core/fetch-price-updates.mdx similarity index 100% rename from pages/price-feeds/fetch-price-updates.mdx rename to pages/price-feeds/core/fetch-price-updates.mdx diff --git a/pages/price-feeds/getting-started.mdx b/pages/price-feeds/core/getting-started.mdx similarity index 100% rename from pages/price-feeds/getting-started.mdx rename to pages/price-feeds/core/getting-started.mdx diff --git a/pages/price-feeds/how-pyth-works.mdx b/pages/price-feeds/core/how-pyth-works.mdx similarity index 100% rename from pages/price-feeds/how-pyth-works.mdx rename to pages/price-feeds/core/how-pyth-works.mdx diff --git a/pages/price-feeds/how-pyth-works/_meta.json b/pages/price-feeds/core/how-pyth-works/_meta.json similarity index 100% rename from pages/price-feeds/how-pyth-works/_meta.json rename to pages/price-feeds/core/how-pyth-works/_meta.json diff --git a/pages/price-feeds/how-pyth-works/cross-chain.mdx b/pages/price-feeds/core/how-pyth-works/cross-chain.mdx similarity index 97% rename from pages/price-feeds/how-pyth-works/cross-chain.mdx rename to pages/price-feeds/core/how-pyth-works/cross-chain.mdx index ad6e39c8..d2e8ba9e 100644 --- a/pages/price-feeds/how-pyth-works/cross-chain.mdx +++ b/pages/price-feeds/core/how-pyth-works/cross-chain.mdx @@ -3,7 +3,7 @@ Pyth uses a cross-chain mechanism to transfer prices from [Pythnet](pythnet.md) to target chains. The diagram below shows how prices are delivered from Pythnet to target chains: -![](../../../images/Pull-Architecture-Hermes.png) +![](../../../../images/Pull-Architecture-Hermes.png) Data providers publish their prices on Pythnet. The on-chain [oracle program](oracle-program.md) then aggregates prices for a feed to obtain the aggregate price and confidence. Next, the Pythnet validators send a Wormhole message on each diff --git a/pages/price-feeds/how-pyth-works/ema-price-aggregation.mdx b/pages/price-feeds/core/how-pyth-works/ema-price-aggregation.mdx similarity index 96% rename from pages/price-feeds/how-pyth-works/ema-price-aggregation.mdx rename to pages/price-feeds/core/how-pyth-works/ema-price-aggregation.mdx index d518cf94..adf79b8f 100644 --- a/pages/price-feeds/how-pyth-works/ema-price-aggregation.mdx +++ b/pages/price-feeds/core/how-pyth-works/ema-price-aggregation.mdx @@ -23,7 +23,7 @@ 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. -![](../../../images/EMA_Price_Aggregation_1.png) +![](../../../../images/EMA_Price_Aggregation_1.png) 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. @@ -38,6 +38,6 @@ 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. -![](../../../images/EMA_Price_Aggregation_2.png) +![](../../../../images/EMA_Price_Aggregation_2.png) 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). diff --git a/pages/price-feeds/how-pyth-works/fees.mdx b/pages/price-feeds/core/how-pyth-works/fees.mdx similarity index 100% rename from pages/price-feeds/how-pyth-works/fees.mdx rename to pages/price-feeds/core/how-pyth-works/fees.mdx diff --git a/pages/price-feeds/how-pyth-works/hermes.mdx b/pages/price-feeds/core/how-pyth-works/hermes.mdx similarity index 93% rename from pages/price-feeds/how-pyth-works/hermes.mdx rename to pages/price-feeds/core/how-pyth-works/hermes.mdx index 80f3d26d..778e2e8c 100644 --- a/pages/price-feeds/how-pyth-works/hermes.mdx +++ b/pages/price-feeds/core/how-pyth-works/hermes.mdx @@ -29,4 +29,4 @@ $ curl https://hermes.pyth.network/api/latest_price_feeds?ids[]=0xff61491a931112 Hermes is a permissionless service that can either be self-hosted or accessed through a third-party provider (similar to a blockchain RPC). The Pyth Data Association also operates a public instance for development purposes. -Please see [Hermes API Instances and Providers](../api-instances-and-providers/hermes) for more details. +Please see [Hermes API Instances and Providers](/price-feeds/core/api-instances-and-providers/hermes) for more details. diff --git a/pages/price-feeds/how-pyth-works/oracle-program.mdx b/pages/price-feeds/core/how-pyth-works/oracle-program.mdx similarity index 100% rename from pages/price-feeds/how-pyth-works/oracle-program.mdx rename to pages/price-feeds/core/how-pyth-works/oracle-program.mdx diff --git a/pages/price-feeds/how-pyth-works/price-aggregation.mdx b/pages/price-feeds/core/how-pyth-works/price-aggregation.mdx similarity index 93% rename from pages/price-feeds/how-pyth-works/price-aggregation.mdx rename to pages/price-feeds/core/how-pyth-works/price-aggregation.mdx index cc2bae22..864b44f5 100644 --- a/pages/price-feeds/how-pyth-works/price-aggregation.mdx +++ b/pages/price-feeds/core/how-pyth-works/price-aggregation.mdx @@ -6,11 +6,11 @@ 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: -![](../../../images/Price_Aggregation_1.png) +![](../../../../images/Price_Aggregation_1.png) 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. -![](../../../images/Price_Aggregation_2.png) +![](../../../../images/Price_Aggregation_2.png) 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. @@ -18,7 +18,7 @@ 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. -![](../../../images/Price_Aggregation_3.png) +![](../../../../images/Price_Aggregation_3.png) **Algorithm** @@ -41,21 +41,21 @@ 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. -![](../../../images/Price_Aggregation_4.png) +![](../../../../images/Price_Aggregation_4.png) 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. -![](../../../images/Price_Aggregation_5.png) +![](../../../../images/Price_Aggregation_5.png) 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. -![](../../../images/Price_Aggregation_6.png) +![](../../../../images/Price_Aggregation_6.png) 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. -![](../../../images/Price_Aggregation_7.png) +![](../../../../images/Price_Aggregation_7.png) **Further Reading** diff --git a/pages/price-feeds/how-pyth-works/pythnet.mdx b/pages/price-feeds/core/how-pyth-works/pythnet.mdx similarity index 100% rename from pages/price-feeds/how-pyth-works/pythnet.mdx rename to pages/price-feeds/core/how-pyth-works/pythnet.mdx diff --git a/pages/price-feeds/core/index.mdx b/pages/price-feeds/core/index.mdx new file mode 100644 index 00000000..a8a265e4 --- /dev/null +++ b/pages/price-feeds/core/index.mdx @@ -0,0 +1,182 @@ +import { ProductCard } from "../../../components/ProductCard"; +import { + BarChartIcon, + ClockIcon, + LightningIcon, + MultiChainIcon, + ShieldIcon, + CodeIcon, +} from "../../../components/icons/ProductIcons"; +import ContractIcon from "../../../components/icons/ContractIcon"; +import SearchIcon from "../../../components/icons/SearchIcon"; +import { Cards, Card } from "nextra/components"; + +# Introduction to Pyth Price Feeds + +Pyth Network provides real-time financial market data to smart contract applications on 100+ blockchains. +Data is sourced from 120+ first-party providers including major exchanges and market makers. + +## Key Features + +- **2000+ price feeds** across all major asset classes +- **Sub-second latency** with high-frequency updates +- **Cryptographically signed** and verifiable on-chain +- **Multi-chain support** including EVM, Cosmos, Solana, Aptos, and more + +## Our Products + +{/* Real-Time Price Feeds - Two Column Layout */} + +
+
+ {/* Left Column - Product Information */} +
+
+
+ Core +
+
+
+ +

+ Real-Time Price Feeds +

+ +

+ Real-time, high-fidelity market data for smart contracts. +

+ + {/* Features */} +
+
+
+ +
+ + Real-time price feeds + +
+
+
+ +
+ + 400ms frequency updates + +
+
+
+ +
+ + 100+ blockchains (EVM, Solana, Aptos, Sui, etc.) + +
+
+ + +
+ + {/* Right Column - Integration Methods */} +
+

Integration Methods

+
+ {/* Pull Integration */} +
+
+
+
Pull Integration
+
+

+ Update 2000+ prices on-demand, permissionlessly every 400ms. +

+ +
+ + {/* Push Feeds */} +
+
+
+
Push Integration
+
+

+ Consume Pyth real-time prices without pulling them explicitly. +

+ +
+
+
+ +
+
+ +{/* Other Products Grid */} + +
+ } + title="Historical Data" + description="Access to historical price data for settlement and backtesting." + features={[ + { icon: , text: "Signed data" }, + { icon: , text: "Verifiable prices" }, + { icon: , text: "Time-stamped prices" }, + ]} + ctaText="Access Historical Data" + href="./core/use-historic-price-data" + /> + +
+ +## Quick Start + + + } + title="Getting Started" + href="./core/getting-started" + /> + } + title="Contract Addresses" + href="./core/contract-addresses" + /> + } title="API Reference" href="./core/api-reference" /> + } + title="Price Feed IDs" + href="./core/price-feeds" + /> + } title="Push Feeds" href="./core/push-feeds" /> + diff --git a/pages/price-feeds/market-hours.mdx b/pages/price-feeds/core/market-hours.mdx similarity index 100% rename from pages/price-feeds/market-hours.mdx rename to pages/price-feeds/core/market-hours.mdx diff --git a/pages/price-feeds/migrate-an-app-to-pyth.mdx b/pages/price-feeds/core/migrate-an-app-to-pyth.mdx similarity index 100% rename from pages/price-feeds/migrate-an-app-to-pyth.mdx rename to pages/price-feeds/core/migrate-an-app-to-pyth.mdx diff --git a/pages/price-feeds/migrate-an-app-to-pyth/_meta.json b/pages/price-feeds/core/migrate-an-app-to-pyth/_meta.json similarity index 100% rename from pages/price-feeds/migrate-an-app-to-pyth/_meta.json rename to pages/price-feeds/core/migrate-an-app-to-pyth/_meta.json diff --git a/pages/price-feeds/migrate-an-app-to-pyth/chainlink.md b/pages/price-feeds/core/migrate-an-app-to-pyth/chainlink.md similarity index 89% rename from pages/price-feeds/migrate-an-app-to-pyth/chainlink.md rename to pages/price-feeds/core/migrate-an-app-to-pyth/chainlink.md index 52d07ffa..8769c882 100644 --- a/pages/price-feeds/migrate-an-app-to-pyth/chainlink.md +++ b/pages/price-feeds/core/migrate-an-app-to-pyth/chainlink.md @@ -61,10 +61,10 @@ contract PythAggregatorV3Deployment is Script { vm.startBroadcast(deployerPrivateKey); // Get the address for your ecosystem from: - // https://docs.pyth.network/price-feeds/contract-addresses/evm + // https://docs.pyth.network/price-feeds/core/contract-addresses/evm address pythPriceFeedsContract = 0xff1a0f4744e8582DF1aE09D5611b887B6a12925C; // Get the price feed ids from: - // https://docs.pyth.network/price-feeds/price-feeds + // https://docs.pyth.network/price-feeds/core/price-feeds bytes32 ethFeedId = 0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace; bytes32 solFeedId = 0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d; @@ -96,7 +96,7 @@ Please see the [Chainlink Migration Example](https://github.com/pyth-network/pyt Chainlink-compatible applications typically expect on-chain price feeds to update on a schedule. When migrating to Pyth, apps may need to schedule these price updates themselves. -This step is required because Pyth is a pull oracle; see [What is a pull oracle?](/price-feeds/pull-updates.mdx) to learn more about this topic. +This step is required because Pyth is a pull oracle; see [What is a pull oracle?](/price-feeds/core/pull-updates.mdx) to learn more about this topic. -The [Sponsored Feeds](/price-feeds/sponsored-feeds.mdx) page shows a list of feeds that have scheduled on-chain updates. -If the feeds your application needs are not on this list, see [Schedule Price Updates](/price-feeds/schedule-price-updates) for several options to solve this problem. +The [Sponsored Feeds](/price-feeds/core/sponsored-feeds.mdx) page shows a list of feeds that have scheduled on-chain updates. +If the feeds your application needs are not on this list, see [Schedule Price Updates](/price-feeds/core/schedule-price-updates) for several options to solve this problem. diff --git a/pages/price-feeds/price-feeds.mdx b/pages/price-feeds/core/price-feeds.mdx similarity index 83% rename from pages/price-feeds/price-feeds.mdx rename to pages/price-feeds/core/price-feeds.mdx index e8b5b086..e625f949 100644 --- a/pages/price-feeds/price-feeds.mdx +++ b/pages/price-feeds/core/price-feeds.mdx @@ -1,4 +1,4 @@ -import { PriceFeedIds } from "../../components/PriceFeedIds"; +import { PriceFeedIds } from "../../../components/PriceFeedIds"; import { Callout } from "nextra/components"; # Price Feeds @@ -33,17 +33,4 @@ See [How to Use Real-Time Data on Solana](./use-real-time-data/solana#price-feed ## Feed Ids - - Important Note for **Testnet** Users - -Developers using any of these testnets: - -- Aptos Testnet -- Sui Testnet -- Near Testnet - -Please use the **Beta** price feed IDs instead of the stable ones. - - - - +Refer to the [Price Feed IDs](/price-feeds/core/price-feeds/price-feed-ids) page for the complete list of price feed IDs. diff --git a/pages/price-feeds/price-feeds/_meta.json b/pages/price-feeds/core/price-feeds/_meta.json similarity index 50% rename from pages/price-feeds/price-feeds/_meta.json rename to pages/price-feeds/core/price-feeds/_meta.json index 4310675f..7d735885 100644 --- a/pages/price-feeds/price-feeds/_meta.json +++ b/pages/price-feeds/core/price-feeds/_meta.json @@ -1,3 +1,4 @@ { + "price-feed-ids": "Price Feed IDs", "asset-classes": "Asset Classes" } diff --git a/pages/price-feeds/price-feeds/asset-classes.mdx b/pages/price-feeds/core/price-feeds/asset-classes.mdx similarity index 100% rename from pages/price-feeds/price-feeds/asset-classes.mdx rename to pages/price-feeds/core/price-feeds/asset-classes.mdx diff --git a/pages/price-feeds/core/price-feeds/price-feed-ids.mdx b/pages/price-feeds/core/price-feeds/price-feed-ids.mdx new file mode 100644 index 00000000..d86b37df --- /dev/null +++ b/pages/price-feeds/core/price-feeds/price-feed-ids.mdx @@ -0,0 +1,27 @@ +import { PriceFeedIds } from "../../../../components/PriceFeedIds"; +import { Callout } from "nextra/components"; + +# Price Feed IDs + +The following table lists the price feed IDs for all the assets supported by Pyth Core. + + + Pyth Core Price Feed IDs **are different** from Pyth Pro Price Feed IDs. + Please refer to the [Pyth Pro Price Feed IDs](/price-feeds/pro/price-feed-ids) + page for Pyth Pro Price Feed IDs. + + + + Important Note for **Testnet** Users + +Developers using any of these testnets: + +- Aptos Testnet +- Sui Testnet +- Near Testnet + +Please use the **Beta** price feed IDs instead of the stable ones. + + + + diff --git a/pages/price-feeds/publish-data.mdx b/pages/price-feeds/core/publish-data.mdx similarity index 100% rename from pages/price-feeds/publish-data.mdx rename to pages/price-feeds/core/publish-data.mdx diff --git a/pages/price-feeds/publish-data/_meta.json b/pages/price-feeds/core/publish-data/_meta.json similarity index 100% rename from pages/price-feeds/publish-data/_meta.json rename to pages/price-feeds/core/publish-data/_meta.json diff --git a/pages/price-feeds/publish-data/confidence-interval-and-crypto-exchange-fees.mdx b/pages/price-feeds/core/publish-data/confidence-interval-and-crypto-exchange-fees.mdx similarity index 93% rename from pages/price-feeds/publish-data/confidence-interval-and-crypto-exchange-fees.mdx rename to pages/price-feeds/core/publish-data/confidence-interval-and-crypto-exchange-fees.mdx index d6cb8f21..2eea9363 100644 --- a/pages/price-feeds/publish-data/confidence-interval-and-crypto-exchange-fees.mdx +++ b/pages/price-feeds/core/publish-data/confidence-interval-and-crypto-exchange-fees.mdx @@ -11,12 +11,12 @@ This is to reflect the "after fee" effective prices that could be gotten on that Example 1 - Exchange A has best aggressive fee of 10bps -![](../../../images/Confidence_Interval_and_Crypto_Exchange_Fees_Table_1.png) +![](../../../../images/Confidence_Interval_and_Crypto_Exchange_Fees_Table_1.png) Exchange A should publish a price of \$50,000.01 and a confidence of \$50.005 (half the bid-ask spread after fee adjustment). It would be wrong to publish a confidence of \$0.005 based on the "not fee-adjusted" raw exchange bid-ask spread. Example 2 - Exchange A has a best aggressive fee of 10bps. Exchange B has a best aggressive fee of 1bps, and a publisher is combining them into a single combined book. Exchange books are combined by taking the best ask across both exchanges and the best bid across both exchanges. -![](../../../images/Confidence_Interval_and_Crypto_Exchange_Fees_Table_2.png) +![](../../../../images/Confidence_Interval_and_Crypto_Exchange_Fees_Table_2.png) In this example, if a publisher were combining the books of Exchange A and Exchange B to get a combined price, they should publish a price of \$49,978.13 and confidence of \$28.125, which corresponds to the midprice and half the bid-ask spread of the combined fee-adjusted books. It would be wrong to publish a price of \$50,000.01 and confidence of \$0.01 based on the "not fee-adjusted" raw exchange prices. Note that in this example, not only is the confidence changed by including the exchange fees, but the price reported is also substantially different once fees are properly accounted for. diff --git a/pages/price-feeds/publish-data/pyth-client-websocket-api.mdx b/pages/price-feeds/core/publish-data/pyth-client-websocket-api.mdx similarity index 100% rename from pages/price-feeds/publish-data/pyth-client-websocket-api.mdx rename to pages/price-feeds/core/publish-data/pyth-client-websocket-api.mdx diff --git a/pages/price-feeds/publish-data/understanding-publishing-slots.mdx b/pages/price-feeds/core/publish-data/understanding-publishing-slots.mdx similarity index 100% rename from pages/price-feeds/publish-data/understanding-publishing-slots.mdx rename to pages/price-feeds/core/publish-data/understanding-publishing-slots.mdx diff --git a/pages/price-feeds/publish-data/useful-resources-for-publishers.mdx b/pages/price-feeds/core/publish-data/useful-resources-for-publishers.mdx similarity index 100% rename from pages/price-feeds/publish-data/useful-resources-for-publishers.mdx rename to pages/price-feeds/core/publish-data/useful-resources-for-publishers.mdx diff --git a/pages/price-feeds/pull-updates.mdx b/pages/price-feeds/core/pull-updates.mdx similarity index 98% rename from pages/price-feeds/pull-updates.mdx rename to pages/price-feeds/core/pull-updates.mdx index 8a91412d..d4a2f3ab 100644 --- a/pages/price-feeds/pull-updates.mdx +++ b/pages/price-feeds/core/pull-updates.mdx @@ -26,7 +26,7 @@ For a more in-depth explanation on the differences between push and pull oracles ## Comparing Push and Pull -![](../../images/Push-vs-Pull-Oracle.jpg) +![](../../../images/Push-vs-Pull-Oracle.jpg) Push and pull oracles differ on a number of important dimensions: diff --git a/pages/price-feeds/push-feeds.mdx b/pages/price-feeds/core/push-feeds.mdx similarity index 95% rename from pages/price-feeds/push-feeds.mdx rename to pages/price-feeds/core/push-feeds.mdx index 6cb3aef6..35249ace 100644 --- a/pages/price-feeds/push-feeds.mdx +++ b/pages/price-feeds/core/push-feeds.mdx @@ -33,5 +33,5 @@ The feeds can vary by network. Please see the relevant section below for the net these push feeds may occasionally experience delays in updates caused by chain halts, gas estimations and other issues. Applications are advised to run their own price-pusher. Find out how you can run your own price-pusher - [here](/price-feeds/schedule-price-updates/using-price-pusher). + [here](/price-feeds/core/schedule-price-updates/using-price-pusher). diff --git a/pages/price-feeds/push-feeds/_meta.json b/pages/price-feeds/core/push-feeds/_meta.json similarity index 100% rename from pages/price-feeds/push-feeds/_meta.json rename to pages/price-feeds/core/push-feeds/_meta.json diff --git a/pages/price-feeds/push-feeds/aptos.mdx b/pages/price-feeds/core/push-feeds/aptos.mdx similarity index 82% rename from pages/price-feeds/push-feeds/aptos.mdx rename to pages/price-feeds/core/push-feeds/aptos.mdx index ddae8ac5..d0138ffd 100644 --- a/pages/price-feeds/push-feeds/aptos.mdx +++ b/pages/price-feeds/core/push-feeds/aptos.mdx @@ -1,6 +1,6 @@ import { Callout } from "nextra/components"; -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import aptosMainnet from "../push-feeds/data/aptos/aptos_mainnet.json"; # Push Feeds on Aptos diff --git a/pages/price-feeds/push-feeds/data/aptos/aptos_mainnet.json b/pages/price-feeds/core/push-feeds/data/aptos/aptos_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/aptos/aptos_mainnet.json rename to pages/price-feeds/core/push-feeds/data/aptos/aptos_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/abstract_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/abstract_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/abstract_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/abstract_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/arbitrum_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/arbitrum_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/arbitrum_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/arbitrum_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/avalanche_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/avalanche_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/avalanche_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/avalanche_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/base_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/base_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/base_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/base_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/berachain_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/berachain_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/berachain_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/berachain_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/ethereum_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/ethereum_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/ethereum_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/ethereum_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/hyperevm_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/hyperevm_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/hyperevm_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/hyperevm_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/linea_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/linea_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/linea_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/linea_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/soneium_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/soneium_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/soneium_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/soneium_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/evm/sonic_mainnet.json b/pages/price-feeds/core/push-feeds/data/evm/sonic_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/evm/sonic_mainnet.json rename to pages/price-feeds/core/push-feeds/data/evm/sonic_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/movement/movement_mainnet.json b/pages/price-feeds/core/push-feeds/data/movement/movement_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/movement/movement_mainnet.json rename to pages/price-feeds/core/push-feeds/data/movement/movement_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/sui/sui_mainnet.json b/pages/price-feeds/core/push-feeds/data/sui/sui_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/sui/sui_mainnet.json rename to pages/price-feeds/core/push-feeds/data/sui/sui_mainnet.json diff --git a/pages/price-feeds/push-feeds/data/svm/fogo_testnet.json b/pages/price-feeds/core/push-feeds/data/svm/fogo_testnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/svm/fogo_testnet.json rename to pages/price-feeds/core/push-feeds/data/svm/fogo_testnet.json diff --git a/pages/price-feeds/push-feeds/data/svm/solana_mainnet.json b/pages/price-feeds/core/push-feeds/data/svm/solana_mainnet.json similarity index 100% rename from pages/price-feeds/push-feeds/data/svm/solana_mainnet.json rename to pages/price-feeds/core/push-feeds/data/svm/solana_mainnet.json diff --git a/pages/price-feeds/push-feeds/evm.mdx b/pages/price-feeds/core/push-feeds/evm.mdx similarity index 96% rename from pages/price-feeds/push-feeds/evm.mdx rename to pages/price-feeds/core/push-feeds/evm.mdx index 1ec41524..4dbed6fd 100644 --- a/pages/price-feeds/push-feeds/evm.mdx +++ b/pages/price-feeds/core/push-feeds/evm.mdx @@ -1,6 +1,6 @@ import { Callout } from "nextra/components"; -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import abstractMainnet from "../push-feeds/data/evm/abstract_mainnet.json"; import arbitrumMainnet from "../push-feeds/data/evm/arbitrum_mainnet.json"; import avalancheMainnet from "../push-feeds/data/evm/avalanche_mainnet.json"; diff --git a/pages/price-feeds/push-feeds/fogo.mdx b/pages/price-feeds/core/push-feeds/fogo.mdx similarity index 82% rename from pages/price-feeds/push-feeds/fogo.mdx rename to pages/price-feeds/core/push-feeds/fogo.mdx index 73a38d4a..99f927a6 100644 --- a/pages/price-feeds/push-feeds/fogo.mdx +++ b/pages/price-feeds/core/push-feeds/fogo.mdx @@ -1,6 +1,6 @@ import { Callout } from "nextra/components"; -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import fogoTestnet from "../push-feeds/data/svm/fogo_testnet.json"; # Push Feeds on Fogo diff --git a/pages/price-feeds/push-feeds/movement.mdx b/pages/price-feeds/core/push-feeds/movement.mdx similarity index 83% rename from pages/price-feeds/push-feeds/movement.mdx rename to pages/price-feeds/core/push-feeds/movement.mdx index 5d135de7..71de4dd3 100644 --- a/pages/price-feeds/push-feeds/movement.mdx +++ b/pages/price-feeds/core/push-feeds/movement.mdx @@ -1,6 +1,6 @@ import { Callout } from "nextra/components"; -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import movementMainnet from "../push-feeds/data/movement/movement_mainnet.json"; # Push Feeds on Movement diff --git a/pages/price-feeds/push-feeds/solana.mdx b/pages/price-feeds/core/push-feeds/solana.mdx similarity index 85% rename from pages/price-feeds/push-feeds/solana.mdx rename to pages/price-feeds/core/push-feeds/solana.mdx index 145e492e..69d89028 100644 --- a/pages/price-feeds/push-feeds/solana.mdx +++ b/pages/price-feeds/core/push-feeds/solana.mdx @@ -1,6 +1,6 @@ import { Callout } from "nextra/components"; -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import solanaMainnet from "../push-feeds/data/svm/solana_mainnet.json"; # Push Feeds on Solana diff --git a/pages/price-feeds/push-feeds/sui.mdx b/pages/price-feeds/core/push-feeds/sui.mdx similarity index 81% rename from pages/price-feeds/push-feeds/sui.mdx rename to pages/price-feeds/core/push-feeds/sui.mdx index a09eb1fd..e0b0d473 100644 --- a/pages/price-feeds/push-feeds/sui.mdx +++ b/pages/price-feeds/core/push-feeds/sui.mdx @@ -1,6 +1,6 @@ import { Callout } from "nextra/components"; -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import suiMainnet from "../push-feeds/data/sui/sui_mainnet.json"; # Push Feeds on Sui diff --git a/pages/price-feeds/core/pythnet-reference.mdx b/pages/price-feeds/core/pythnet-reference.mdx new file mode 100644 index 00000000..aa27db1d --- /dev/null +++ b/pages/price-feeds/core/pythnet-reference.mdx @@ -0,0 +1,7 @@ +# Pythnet Reference + +The documentation in this section describes the structure of Pythnet accounts and their contents: + +- [Account Structure](/price-feeds/core/pythnet-reference/account-structure.mdx) describes the accounts that exist and their high-level contents +- [Product Metadata](/price-feeds/core/pythnet-reference/product-metadata.mdx) describes the metadata associated with each product account +- [Schedule Format](/price-feeds/core/pythnet-reference/schedule-format.mdx) describes the `schedule` field of the product metadata diff --git a/pages/price-feeds/pythnet-reference/_meta.json b/pages/price-feeds/core/pythnet-reference/_meta.json similarity index 100% rename from pages/price-feeds/pythnet-reference/_meta.json rename to pages/price-feeds/core/pythnet-reference/_meta.json diff --git a/pages/price-feeds/pythnet-reference/account-structure.mdx b/pages/price-feeds/core/pythnet-reference/account-structure.mdx similarity index 100% rename from pages/price-feeds/pythnet-reference/account-structure.mdx rename to pages/price-feeds/core/pythnet-reference/account-structure.mdx diff --git a/pages/price-feeds/pythnet-reference/product-metadata.mdx b/pages/price-feeds/core/pythnet-reference/product-metadata.mdx similarity index 100% rename from pages/price-feeds/pythnet-reference/product-metadata.mdx rename to pages/price-feeds/core/pythnet-reference/product-metadata.mdx diff --git a/pages/price-feeds/pythnet-reference/schedule-format.mdx b/pages/price-feeds/core/pythnet-reference/schedule-format.mdx similarity index 100% rename from pages/price-feeds/pythnet-reference/schedule-format.mdx rename to pages/price-feeds/core/pythnet-reference/schedule-format.mdx diff --git a/pages/price-feeds/rate-limits.mdx b/pages/price-feeds/core/rate-limits.mdx similarity index 100% rename from pages/price-feeds/rate-limits.mdx rename to pages/price-feeds/core/rate-limits.mdx diff --git a/pages/price-feeds/schedule-price-updates.mdx b/pages/price-feeds/core/schedule-price-updates.mdx similarity index 86% rename from pages/price-feeds/schedule-price-updates.mdx rename to pages/price-feeds/core/schedule-price-updates.mdx index ac6d8db0..e907bdf5 100644 --- a/pages/price-feeds/schedule-price-updates.mdx +++ b/pages/price-feeds/core/schedule-price-updates.mdx @@ -4,10 +4,10 @@ import { Callout } from "nextra/components"; The following guides explain how to schedule Pyth price updates to occur at regular intervals. As a pull oracle, Pyth's users are typically responsible for updating the state of on-chain feeds. -Please see [What is a Pull Oracle?](/price-feeds/pull-updates) to learn more about pull updates. +Please see [What is a Pull Oracle?](/price-feeds/core/pull-updates) to learn more about pull updates. The Pyth Data Association sponsors regular on-chain updates for some price feeds. -See [Sponsored Feeds](/price-feeds/sponsored-feeds) for the current list of feeds and their update parameters. +See [Sponsored Feeds](/price-feeds/core/sponsored-feeds) for the current list of feeds and their update parameters. If you would like to see additional feeds on this list, please [contact the association via this form](https://tally.so/r/nGz2jj). There are also three different tools to schedule price updates: diff --git a/pages/price-feeds/schedule-price-updates/_meta.json b/pages/price-feeds/core/schedule-price-updates/_meta.json similarity index 100% rename from pages/price-feeds/schedule-price-updates/_meta.json rename to pages/price-feeds/core/schedule-price-updates/_meta.json diff --git a/pages/price-feeds/schedule-price-updates/using-adrastia.mdx b/pages/price-feeds/core/schedule-price-updates/using-adrastia.mdx similarity index 100% rename from pages/price-feeds/schedule-price-updates/using-adrastia.mdx rename to pages/price-feeds/core/schedule-price-updates/using-adrastia.mdx diff --git a/pages/price-feeds/schedule-price-updates/using-gelato.mdx b/pages/price-feeds/core/schedule-price-updates/using-gelato.mdx similarity index 95% rename from pages/price-feeds/schedule-price-updates/using-gelato.mdx rename to pages/price-feeds/core/schedule-price-updates/using-gelato.mdx index 0afab93a..265a3f19 100644 --- a/pages/price-feeds/schedule-price-updates/using-gelato.mdx +++ b/pages/price-feeds/core/schedule-price-updates/using-gelato.mdx @@ -44,7 +44,7 @@ https://app.gelato.network/new-task?cid=QmbNPFa3ixUpphUzKJwq3F9bjC9w63FBYQ4iV3s2 The pyth web3 function code is deployed to IPFS, so you can use it via the cid/link above. You can find a copy of the web3 function code [here](https://github.com/pyth-network/pyth-gelato-price-pusher/tree/main/web3-functions/pyth-oracle-w3f-priceIds) Choose network, and then in the "Task secrets" section, set `GIST_ID` to the gistId of the gist you created in step 2. -![](../../../images/guides/gelato/task-creation-gist-id.png) +![](../../../../images/guides/gelato/task-creation-gist-id.png) **Note that the free tier have certain limits, Checkout all subscription plans and choose the one that best fits your needs [here](https://app.gelato.network/1balance/subscriptions/functions?networkGroup=mainnets&type=monthly)**. @@ -61,7 +61,7 @@ and transaction gas fees. Testnet executions are subsidized by Gelato and free. Note : You can deposit USDC from any chain supported by Circle CCTP. Deposit USDC -![](../../../images/guides/gelato/deposit-usdc.png) +![](../../../../images/guides/gelato/deposit-usdc.png) **Pyth Fees** @@ -77,7 +77,7 @@ Pyth fees are paid by the `dedicatedMsgSender` and transaction fees as well as c You will need to transfer over the native tokens to `dedicatedMsgSender` on every chain where you want to run the task using a standard transfer. The `dedicatedMsgSender` address can be found in the Gelato App settings and on the Task dashboard as well. -![](../../../images/guides/gelato/dedicated-msg-sender.png) +![](../../../../images/guides/gelato/dedicated-msg-sender.png) You can simply open your wallet and send native tokens to `dedicatedMsgSender` on the chain(s) where you want to run the task. @@ -86,7 +86,7 @@ task. Once your task has been successfully created, you can check the task execution details on the Task dashboard in the Gelato app. -![](../../../images/guides/gelato/task-execution.png) +![](../../../../images/guides/gelato/task-execution.png) ## Managing your Gelato Task @@ -111,7 +111,7 @@ fetch the latest configuration from the gist vs reading a locally cached version rate-limited by GitHub. To verify that your most recent task execution used the latest configuration, you can check the "Storage" tab on the task details page and look at the configuration stored under the `pythConfig` key. -![](../../../images/guides/gelato/storage-pyth-config.png) +![](../../../../images/guides/gelato/storage-pyth-config.png) ## Notes diff --git a/pages/price-feeds/schedule-price-updates/using-price-pusher.mdx b/pages/price-feeds/core/schedule-price-updates/using-price-pusher.mdx similarity index 100% rename from pages/price-feeds/schedule-price-updates/using-price-pusher.mdx rename to pages/price-feeds/core/schedule-price-updates/using-price-pusher.mdx diff --git a/pages/price-feeds/troubleshoot.mdx b/pages/price-feeds/core/troubleshoot.mdx similarity index 100% rename from pages/price-feeds/troubleshoot.mdx rename to pages/price-feeds/core/troubleshoot.mdx diff --git a/pages/price-feeds/troubleshoot/_meta.json b/pages/price-feeds/core/troubleshoot/_meta.json similarity index 100% rename from pages/price-feeds/troubleshoot/_meta.json rename to pages/price-feeds/core/troubleshoot/_meta.json diff --git a/pages/price-feeds/troubleshoot/evm.mdx b/pages/price-feeds/core/troubleshoot/evm.mdx similarity index 100% rename from pages/price-feeds/troubleshoot/evm.mdx rename to pages/price-feeds/core/troubleshoot/evm.mdx diff --git a/pages/price-feeds/troubleshoot/svm.mdx b/pages/price-feeds/core/troubleshoot/svm.mdx similarity index 100% rename from pages/price-feeds/troubleshoot/svm.mdx rename to pages/price-feeds/core/troubleshoot/svm.mdx diff --git a/pages/price-feeds/use-historic-price-data.mdx b/pages/price-feeds/core/use-historic-price-data.mdx similarity index 100% rename from pages/price-feeds/use-historic-price-data.mdx rename to pages/price-feeds/core/use-historic-price-data.mdx diff --git a/pages/price-feeds/use-pyth-for-morpho.mdx b/pages/price-feeds/core/use-pyth-for-morpho.mdx similarity index 95% rename from pages/price-feeds/use-pyth-for-morpho.mdx rename to pages/price-feeds/core/use-pyth-for-morpho.mdx index 66c56243..15fb4b17 100644 --- a/pages/price-feeds/use-pyth-for-morpho.mdx +++ b/pages/price-feeds/core/use-pyth-for-morpho.mdx @@ -16,9 +16,9 @@ There are two steps to use Pyth price feeds for Morpho markets: ### Schedule Price Updates As a pull oracle, Pyth's users are typically responsible for updating the state of on-chain feeds. -Please see [What is a Pull Oracle?](/price-feeds/pull-updates) to learn more about pull updates. +Please see [What is a Pull Oracle?](/price-feeds/core/pull-updates) to learn more about pull updates. -Consult [Schedule Price Updates](/price-feeds/schedule-price-updates) guide for more information. +Consult [Schedule Price Updates](/price-feeds/core/schedule-price-updates) guide for more information. The Pyth Data Association sponsors regular on-chain updates for some price feeds. See [Sponsored Feeds](./sponsored-feeds.mdx) for the current list of feeds and their update parameters. diff --git a/pages/price-feeds/use-real-time-data.mdx b/pages/price-feeds/core/use-real-time-data.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data.mdx rename to pages/price-feeds/core/use-real-time-data.mdx diff --git a/pages/price-feeds/use-real-time-data/_meta.json b/pages/price-feeds/core/use-real-time-data/_meta.json similarity index 100% rename from pages/price-feeds/use-real-time-data/_meta.json rename to pages/price-feeds/core/use-real-time-data/_meta.json diff --git a/pages/price-feeds/use-real-time-data/pull-integration/_meta.json b/pages/price-feeds/core/use-real-time-data/pull-integration/_meta.json similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/_meta.json rename to pages/price-feeds/core/use-real-time-data/pull-integration/_meta.json diff --git a/pages/price-feeds/use-real-time-data/pull-integration/aptos.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/aptos.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/aptos.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/aptos.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/cosmwasm.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/cosmwasm.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/cosmwasm.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/cosmwasm.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/evm.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/evm.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/evm.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/evm.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/fuel.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/fuel.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/fuel.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/fuel.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/iota.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/iota.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/iota.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/iota.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/near.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/near.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/near.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/near.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/solana.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/solana.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/solana.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/solana.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/stacks.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/stacks.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/stacks.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/stacks.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/starknet.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/starknet.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/starknet.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/starknet.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/sui.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/sui.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/sui.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/sui.mdx diff --git a/pages/price-feeds/use-real-time-data/pull-integration/ton.mdx b/pages/price-feeds/core/use-real-time-data/pull-integration/ton.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/pull-integration/ton.mdx rename to pages/price-feeds/core/use-real-time-data/pull-integration/ton.mdx diff --git a/pages/price-feeds/use-real-time-data/push-integration.mdx b/pages/price-feeds/core/use-real-time-data/push-integration.mdx similarity index 93% rename from pages/price-feeds/use-real-time-data/push-integration.mdx rename to pages/price-feeds/core/use-real-time-data/push-integration.mdx index 73509237..5a56ed69 100644 --- a/pages/price-feeds/use-real-time-data/push-integration.mdx +++ b/pages/price-feeds/core/use-real-time-data/push-integration.mdx @@ -7,7 +7,7 @@ Refer to the [Push Feeds page](../push-feeds) to see which feeds are being updat If your feeds are not listed there, you have several options: - **Request Feeds**: Fill out [this form](https://tally.so/r/nGz2jj) to request the feeds you need. This is the fastest and simplest way to get your feeds pushed on chain. -- **Run Price Pusher**: Set up and run a [Price Pusher](/price-feeds/schedule-price-updates/using-price-pusher) to automate the process of updating the on-chain price +- **Run Price Pusher**: Set up and run a [Price Pusher](/price-feeds/core/schedule-price-updates/using-price-pusher) to automate the process of updating the on-chain price To use real-time price data using push feeds, developers can use the following code snippet based on the ecosystem: @@ -37,7 +37,7 @@ contract SomeContract { */ constructor(address pythContract) { // The IPyth interface from pyth-sdk-solidity provides the methods to interact with the Pyth contract. - // Instantiate it with the Pyth contract address from https://docs.pyth.network/price-feeds/contract-addresses/evm + // Instantiate it with the Pyth contract address from https://docs.pyth.network/price-feeds/core/contract-addresses/evm pyth = IPyth(pythContract); } @@ -47,7 +47,7 @@ contract SomeContract { function exampleMethod() public { // Read the current price from a price feed if it is less than 60 seconds old. // Each price feed (e.g., ETH/USD) is identified by a price feed ID. - // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/core/price-feeds bytes32 priceFeedId = 0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace; // ETH/USD PythStructs.Price memory price = pyth.getPriceNoOlderThan(priceFeedId, 60); } diff --git a/pages/price-feeds/why-update-prices.mdx b/pages/price-feeds/core/why-update-prices.mdx similarity index 100% rename from pages/price-feeds/why-update-prices.mdx rename to pages/price-feeds/core/why-update-prices.mdx diff --git a/pages/price-feeds/index.mdx b/pages/price-feeds/index.mdx index 2d3e494b..df526db9 100644 --- a/pages/price-feeds/index.mdx +++ b/pages/price-feeds/index.mdx @@ -6,198 +6,119 @@ import { MultiChainIcon, ShieldIcon, CodeIcon, + ListIcon, + KeyIcon, + PlayIcon, + MoneyWavyIcon, } from "../../components/icons/ProductIcons"; -import ContractIcon from "../../components/icons/ContractIcon"; -import SearchIcon from "../../components/icons/SearchIcon"; -import { Cards, Card } from "nextra/components"; -# Introduction to Pyth Price Feeds +# Price Feeds -Pyth Network provides real-time financial market data to smart contract applications on 100+ blockchains. -Data is sourced from 120+ first-party providers including major exchanges and market makers. +Pyth Price Feeds deliver real-time financial market data sources from 120+ first-party providers. These providers include leading exchanges, banks, trading firms, and market makers. +Additionally, Pyth Price data can be verified on 100+ blockchains. -## Key Features +## Product Options -- **2000+ price feeds** across all major asset classes -- **Sub-second latency** with high-frequency updates -- **Cryptographically signed** and verifiable on-chain -- **Multi-chain support** including EVM, Cosmos, Solana, Aptos, and more +Pyth offers two main versions of price feeds, each optimized for different use cases: -## Our Products - -{/* Real-Time Price Feeds - Two Column Layout */} - -
-
- {/* Left Column - Product Information */} -
-
-
- Core -
-
-
- -

- Real-Time Price Feeds -

- -

- Real-time, high-fidelity market data for smart contracts. -

- - {/* Features */} -
-
-
- -
- - Real-time price feeds - -
-
-
- -
- - 400ms frequency updates - -
-
-
- -
- - 100+ blockchains (EVM, Solana, Aptos, Sui, etc.) - -
-
- - -
- - {/* Right Column - Integration Methods */} -
-

Integration Methods

-
- {/* Pull Integration */} -
-
-
-
Pull Integration
-
-

- Update 2000+ prices on-demand, permissionlessly every 400ms. -

- -
- - {/* Push Feeds */} -
-
-
-
Push Integration
-
-

- Consume Pyth real-time prices without pulling them explicitly. -

- -
-
-
- -
-
- -{/* Other Products Grid */} - -
- } - title="Historical Data" - description="Access to historical price data for settlement and backtesting." - features={[ - { icon: , text: "Signed data" }, - { icon: , text: "Verifiable prices" }, - { icon: , text: "Time-stamped prices" }, - ]} - ctaText="Access Historical Data" - href="./price-feeds/use-historic-price-data" - /> - - +
+} - title="Lazer" - description="High-performance, low-latency price feeds for institutional applications." + title="Pyth Pro" + description={<>Subscription-based price data for institutions and advanced use cases.
Previously known as Lazer.} features={[ { icon: , text: "Ultra-low latency" }, - { icon: , text: "Institutional grade" }, - { icon: , text: "High-frequency data" } + { icon: , text: "Crypto, Equities & Indexes" }, + { icon: , text: "Customizable channels and latency" }, + { icon: , text: "Dedicated support" } + ]} + quickActions={[ + { icon: , title: "Available Price Feeds", href: "./price-feeds/pro/price-feed-ids" }, + { icon: , title: "Get an access token", href: "https://tally.so/r/3xG8E5" }, + { icon: , title: "Pricing", href: "https://www.pyth.network/pricing" }, ]} - ctaText="Learn About Lazer" - href="../lazer" + ctaText="Explore Pro Documentation" + href="./price-feeds/pro" /> + +{" "} + +} + title="Pyth Core" + description="The original Pyth oracle: decentralized price feeds for DeFi and TradFi builders." + features={[ + { icon: , text: "400ms update frequency" }, + { icon: , text: "100+ blockchains" }, + { icon: , text: "Supports Pull and Push updates" }, + { icon: , text: "Decentralized Oracle" }, + ]} + quickActions={[ + { + icon: , + title: "Available Price Feeds", + href: "./price-feeds/core/price-feeds", + }, + { + icon: , + title: "Contract Addresses", + href: "./price-feeds/core/contract-addresses", + }, + { + icon: , + title: "Current Fees", + href: "./price-feeds/core/current-fees", + }, + ]} + ctaText="Explore Core Documentation" + href="./price-feeds/core" +/> +
-## Quick Start +## Additional Resources - - } - title="Getting Started" - href="./price-feeds/getting-started" - /> - } - title="Contract Addresses" - href="./price-feeds/contract-addresses" - /> - } - title="Push Feeds" - href="./price-feeds/push-feeds" - /> - } - title="API Reference" - href="./price-feeds/api-reference" - /> - } - title="Price Feed IDs" - href="./price-feeds/price-feeds" - /> - +
+
+

Price Feed IDs

+

Complete list of price feed IDs for both Pro and Core.

+ Pyth Core IDs → + | + Pyth Pro IDs → +
+ +{" "} + +
+

+ API Reference +

+

+ Complete API documentation for both Pro and Core. +

+ + Core APIs → + + | + + Pro API → + +
+ +
+

Examples

+

Sample applications and integration examples.

+ View Examples → +
+
diff --git a/pages/lazer/_meta.json b/pages/price-feeds/pro/_meta.json similarity index 68% rename from pages/lazer/_meta.json rename to pages/price-feeds/pro/_meta.json index b77c9dc2..d7330b56 100644 --- a/pages/lazer/_meta.json +++ b/pages/price-feeds/pro/_meta.json @@ -1,13 +1,4 @@ { - "documentation-home": { - "title": "← Documentation Home", - "href": "/home" - }, - - "-- Lazer": { - "title": "Lazer", - "type": "separator" - }, "index": "Introduction", "getting-started": "Getting Started", @@ -17,7 +8,7 @@ }, "acquire-access-token": "Acquire an Access Token", - "subscribe-price-updates": "Subscribe to Price Updates", + "subscribe-price-updates": "Subscribe to Prices", "integrate-as-consumer": "Integrate as a Consumer", "integrate-as-publisher": "Integrate as a Publisher", @@ -25,7 +16,6 @@ "title": "Reference Material", "type": "separator" }, - "payload-reference": "Payload Reference", "price-feed-ids": "Price Feed IDs", "websocket-api-reference": { @@ -39,10 +29,10 @@ "href": "https://github.com/pyth-network/pyth-examples/tree/main/lazer", "newWindow": true }, - "-- Understand Lazer": { - "title": "Understanding Lazer", + "-- Understand Pyth Pro": { + "title": "Understanding Pyth Pro", "type": "separator" }, - "how-lazer-works": "How Lazer Works" + "how-lazer-works": "How Pyth Pro Works" } diff --git a/pages/lazer/acquire-access-token.mdx b/pages/price-feeds/pro/acquire-access-token.mdx similarity index 70% rename from pages/lazer/acquire-access-token.mdx rename to pages/price-feeds/pro/acquire-access-token.mdx index b11f23cd..83e8b152 100644 --- a/pages/lazer/acquire-access-token.mdx +++ b/pages/price-feeds/pro/acquire-access-token.mdx @@ -2,14 +2,14 @@ import { Callout } from "nextra/components"; # Acquire an Access Token -This guide explains how to acquire an access token for Pyth Lazer, which is required to authenticate websocket connections and subscribe to price updates. +This guide explains how to acquire an access token for Pyth Pro, which is required to authenticate websocket connections and subscribe to price updates. ## Request Access Token Please fill out [this form](https://tally.so/r/3xG8E5) to contact the Pyth team and get the access token. - Access tokens are required for all Pyth Lazer websocket connections. Make sure + Access tokens are required for all Pyth Pro websocket connections. Make sure to keep your token secure and do not share it publicly. @@ -30,4 +30,4 @@ const client = await PythLazerClient.create( ## Next Steps -After acquiring your access token, you can proceed to [subscribe to price updates](./subscribe-price-updates.mdx) using the Pyth Lazer websocket API. +After acquiring your access token, you can proceed to [subscribe to price feeds](./subscribe-price-updates.mdx) using the Pyth Pro websocket API. diff --git a/pages/lazer/getting-started.mdx b/pages/price-feeds/pro/getting-started.mdx similarity index 73% rename from pages/lazer/getting-started.mdx rename to pages/price-feeds/pro/getting-started.mdx index b1a7b38d..646c0295 100644 --- a/pages/lazer/getting-started.mdx +++ b/pages/price-feeds/pro/getting-started.mdx @@ -1,9 +1,9 @@ import { Callout, Steps } from "nextra/components"; -# Getting Started with Pyth Lazer +# Getting Started with Pyth Pro -Pyth Lazer is a high-performance, low-latency service that provides real-time financial market data. -This guide will walk you through setting up and running a basic JavaScript example to subscribe to Lazer price feeds. +Pyth Pro is a high-performance, low-latency service that provides real-time financial market data. +This guide will walk you through setting up and running a basic JavaScript example to subscribe to Pyth Pro price feeds. ## Prerequisites @@ -12,7 +12,7 @@ Before getting started, make sure you have the following installed: - **Node.js** (version 18 or higher) - **pnpm** package manager - **Git** for cloning the examples repository -- A **Lazer Access Token** - see [How to Acquire an Access Token](./acquire-access-token) if you don't have one +- A **Pyth Pro Access Token** - see [How to Acquire an Access Token](./acquire-access-token) if you don't have one @@ -33,35 +33,39 @@ Install the required dependencies using pnpm: pnpm install ``` -This will install `@pythnetwork/pyth-lazer-sdk`, which is the main Lazer SDK. +This will install `@pythnetwork/pyth-lazer-sdk`, which will be used to subscribe to Pyth Pro prices. + + + **Pyth Pro was previously known as Pyth Lazer**. The SDK remains the same. + ### Configure Your Access Token -Set your Lazer access token as an environment variable: +Set your Pyth Pro access token as an environment variable: ```bash copy export ACCESS_TOKEN=your_actual_token_here ``` - Replace `your_actual_token_here` with your actual Lazer access token. If you + Replace `your_actual_token_here` with your actual PythPro access token. If you don't have one, follow the [access token guide](./acquire-access-token) to obtain it. ### Run the Basic WebSocket Example -Now you can run the basic example that demonstrates connecting to Lazer and receiving price updates: +Now you can run the basic example that demonstrates connecting to Pyth Pro and receiving price updates: ```bash copy pnpm run start ``` -This command will subscribe to Pyth Lazer updates for two price feeds, receiving streaming updates. +This command will subscribe to Pyth Pro updates for two price feeds, receiving streaming updates. Each update is then printed to the terminal on receipt. You should see output similar to the following: -``` +```bash got message: { type: 'json', value: { @@ -98,7 +102,7 @@ stream updated for subscription 1 : [ ### Understanding the Code -The main example code in `src/index.ts` demonstrates the core Lazer integration pattern: +The main example code in `src/index.ts` demonstrates the core Pyth Pro integration pattern: ```typescript import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; @@ -127,25 +131,27 @@ client.subscribe({ }); ``` +NOTE: Every property passed to `client.subscribe` are explained in the [API Reference](https://pyth-lazer.dourolabs.app/docs). + ## What's Next? -Now that you've successfully run the basic Lazer example, you can explore more advanced integration patterns: +Now that you've successfully run the basic Pyth Pro example, you can explore more advanced integration patterns: ### More Information -Explore additional Lazer capabilities: +Explore additional Pyth Pro capabilities: - **[Subscribe to Price Updates](./subscribe-price-updates)** - Detailed guide on WebSocket subscriptions and message handling - **[Price Feed IDs](./price-feed-ids)** - Complete list of available price feeds and their identifiers ### Blockchain Integration -Learn how to integrate Lazer price feeds into your smart contracts: +Learn how to integrate Pyth Pro price feeds into your smart contracts: -- **[Solana Integration](./integrate-as-consumer/svm)** - Build SVM smart contracts that consume Lazer price feeds with cryptographic verification -- **[EVM Integration](./integrate-as-consumer/evm)** - Integrate Lazer into Ethereum and other EVM-compatible chains +- **[Solana Integration](./integrate-as-consumer/svm)** - Build SVM smart contracts that consume Pyth Pro price feeds with cryptographic verification +- **[EVM Integration](./integrate-as-consumer/evm)** - Integrate Pyth Pro into Ethereum and other EVM-compatible chains ### Example Applications diff --git a/pages/price-feeds/pro/how-lazer-works.mdx b/pages/price-feeds/pro/how-lazer-works.mdx new file mode 100644 index 00000000..ff350c14 --- /dev/null +++ b/pages/price-feeds/pro/how-lazer-works.mdx @@ -0,0 +1,6 @@ +# How Pyth Pro works + +Pyth Pro uses the same infrastructure as Pyth Lazer. +It is a permissioned service that provides ultra-low-latency price and market data to highly latency-sensitive users. + +We are working on writing a detailed technical overview how Pyth Pro infrastructure works. Details will be added here as they are completed. diff --git a/pages/price-feeds/pro/index.mdx b/pages/price-feeds/pro/index.mdx new file mode 100644 index 00000000..b12886bc --- /dev/null +++ b/pages/price-feeds/pro/index.mdx @@ -0,0 +1,35 @@ +import { Callout } from "nextra/components"; +import { Cards, Card } from "nextra/components"; +import { + KeyIcon, + LightningIcon, + BarChartIcon, +} from "../../../components/icons/ProductIcons"; + +# Pyth Pro + +Pyth Pro was previously known as Pyth Lazer. + +Pyth Pro delivers customizable, enterprise-grade price data directly from first-party publishers. +Subscribers can configure their price feeds, update schedules, and usage rights for display or redistribution. +The service is delivered through standard APIs for seamless integration. + +--- + + + } + title="Get your access token" + href="./pro/acquire-access-token" + /> + } + title="Subscribe to prices" + href="./pro/subscribe-price-updates" + /> + } + title="Pricing" + href="https://www.pyth.network/pricing" + /> + diff --git a/pages/price-feeds/pro/integrate-as-consumer.mdx b/pages/price-feeds/pro/integrate-as-consumer.mdx new file mode 100644 index 00000000..94cfb17d --- /dev/null +++ b/pages/price-feeds/pro/integrate-as-consumer.mdx @@ -0,0 +1,11 @@ +# How to verify Price Updates as a Consumer on Blockchain + +The following guides demonstrate how to verify price updates as a consumer on blockchain. + +Pyth Pro price updates can be verified on Solana, Fogo, and EVM chains. Please consult the following guides to get started: + +- [Solana and Fogo](integrate-as-consumer/svm) +- [EVM](integrate-as-consumer/evm) + +Pyth Pro price updates can also be used in off-chain applications. See the +[subscription guide](subscribe-price-updates) and the [Terms of Service](https://www.dourolabs.xyz/Subscription-Terms.pdf) for more information. diff --git a/pages/lazer/integrate-as-consumer/_meta.json b/pages/price-feeds/pro/integrate-as-consumer/_meta.json similarity index 100% rename from pages/lazer/integrate-as-consumer/_meta.json rename to pages/price-feeds/pro/integrate-as-consumer/_meta.json diff --git a/pages/lazer/integrate-as-consumer/evm.mdx b/pages/price-feeds/pro/integrate-as-consumer/evm.mdx similarity index 80% rename from pages/lazer/integrate-as-consumer/evm.mdx rename to pages/price-feeds/pro/integrate-as-consumer/evm.mdx index e0a6e882..5af5f3e7 100644 --- a/pages/lazer/integrate-as-consumer/evm.mdx +++ b/pages/price-feeds/pro/integrate-as-consumer/evm.mdx @@ -1,20 +1,20 @@ import { Callout, Tabs, Steps } from "nextra/components"; -# Integrate Pyth Lazer as a Consumer on EVM chains +# Integrate as a Consumer on EVM chains -This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **EVM chains**. +This guide is intended to serve users who wants to consume prices from the Pyth Pro on **EVM chains**. -Integrating with Pyth Lazer in smart contracts as a consumer is a three-step process: +Integrating with Pyth Pro in smart contracts as a consumer is a three-step process: 1. **Use** Pyth Lazer SDK in EVM smart contracts to parse the price updates. -2. **Subscribe** to Pyth Lazer websocket to receive price updates on backend or frontend. +2. **Subscribe** to Pyth Pro websocket to receive price updates on backend or frontend. 3. **Include** the price updates into the smart contract transactions. ### Use Pyth Lazer SDK in smart contracts -Pyth Lazer provides a [Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/contracts/evm), which allows consumers to parse the price updates. +Pyth Pro provides a [Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/contracts/evm), which allows consumers to parse the price updates. ```bash copy forge install pyth-network/pyth-crosschain @@ -52,7 +52,7 @@ contract ExampleConsumer { ``` -Add an argument of type `bytes calldata{:solidity}` to the method which will receive the Pyth Lazer price udpate: +Add an argument of type `bytes calldata{:solidity}` to the method which will receive the price update: ```solidity copy function updatePrice(bytes calldata priceUpdate) public payable { @@ -125,11 +125,11 @@ for (uint8 i = 0; i < feedsLen; i++) { price updates via WebSocket. This will be explained in the next step. -### Subscribe to Pyth Lazer to receive Price Updates +### Subscribe to Pyth Pro to receive Price Updates -Pyth Lazer provides a websocket endpoint to receive price updates. Moreover, Pyth Lazer also provides a [Typescript SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to subscribe to the websocket endpoint. +Pyth Pro provides a websocket endpoint to receive price updates. Moreover, Pyth Pro also provides a [Typescript SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to subscribe to the websocket endpoint. -Consult [How to subscribe to price updates from Pyth Lazer](../subscribe-price-updates.mdx) for a complete step-by-step guide. +Consult [How to subscribe to price updates](../subscribe-price-updates.mdx) for a complete step-by-step guide. ### Include the price updates into smart contract transactions @@ -139,14 +139,14 @@ Now that you have the price updates, and your smart contract is able to parse th ## Additional Resources -You may find these additional resources helpful for integrating Pyth Lazer into your EVM smart contracts. +You may find these additional resources helpful for consuming prices from Pyth Pro into your EVM smart contracts. ### Price Feed IDs -Pyth Lazer supports a wide range of price feeds. Consult the [Price Feed IDs](../price-feed-ids.mdx) page for a complete list of supported price feeds. +Pyth Pro supports a wide range of price feeds. Consult the [Price Feed IDs](../price-feed-ids.mdx) page for a complete list of supported price feeds. ### Examples -[Pyth-lazer-example-evm](https://github.com/pyth-network/pyth-examples/tree/main/lazer/evm) is a simple example contract that parses and consumes price updates from Pyth Lazer. +[Pyth-lazer-example-evm](https://github.com/pyth-network/pyth-examples/tree/main/lazer/evm) is a simple example contract that parses and consumes price updates from Pyth Pro. -[pyth-lazer-example-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Lazer websocket. +[pyth-lazer-example-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Pro websocket. diff --git a/pages/lazer/integrate-as-consumer/svm.mdx b/pages/price-feeds/pro/integrate-as-consumer/svm.mdx similarity index 87% rename from pages/lazer/integrate-as-consumer/svm.mdx rename to pages/price-feeds/pro/integrate-as-consumer/svm.mdx index 11c9c11b..62754599 100644 --- a/pages/lazer/integrate-as-consumer/svm.mdx +++ b/pages/price-feeds/pro/integrate-as-consumer/svm.mdx @@ -1,20 +1,22 @@ import { Callout, Tabs, Steps } from "nextra/components"; -# Integrate Pyth Lazer as a Consumer on Solana and Fogo +# Integrate as a Consumer on Solana and Fogo -This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **Solana and Fogo**. +This guide is intended to serve users who wants to consume prices from the Pyth Pro on **Solana and Fogo**. -Integrating with Pyth Lazer in smart contracts as a consumer is a three-step process: +Pyth Pro was previously known as Pyth Lazer. + +Integrating with Pyth Pro in smart contracts as a consumer is a three-step process: 1. **Use** Pyth Lazer SDK into SVM smart contracts to parse the price updates. -2. **Subscribe** to Pyth Lazer websocket to receive price updates on backend or frontend. +2. **Subscribe** to Pyth Pro websocket to receive price updates on backend or frontend. 3. **Include** the price updates into the smart contract transactions. ### Use Pyth Lazer SDK in smart contracts -Pyth Lazer provides a [Solana SDK](https://docs.rs/pyth-lazer-solana-contract/latest/pyth_lazer_solana_contract/), +Pyth Pro/Lazer provides a [Solana SDK](https://docs.rs/pyth-lazer-solana-contract/latest/pyth_lazer_solana_contract/), which allows consumers to parse and verify the price updates on Solana-compatible chains (such as Fogo). To start, add the following to your `Cargo.toml` file (please check the current latest version at [crates.io](https://crates.io/crates/pyth-lazer-solana-contract)): @@ -24,10 +26,10 @@ To start, add the following to your `Cargo.toml` file (please check the current pyth-lazer-solana-contract = { version = "x.y.z", features = ["no-entrypoint"] } ``` -Now you can create an instruction or multiple instructions that will receive Pyth Lazer messages. -The instruction data sent to your program should include a byte array containing the Pyth Lazer message. The instruction data can also contain any other parameters your contracts may need. +Now you can create an instruction or multiple instructions that will receive Pyth Pro messages. +The instruction data sent to your program should include a byte array containing the Pyth Pro message. The instruction data can also contain any other parameters your contracts may need. -In order to successfully validate the Pyth Lazer message, the instruction needs to receive the following accounts: +In order to successfully validate price updates, the instruction needs to receive the following accounts: - Fee payer account - Pyth Lazer program ([`pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt`](https://solscan.io/account/pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt)) @@ -163,7 +165,7 @@ invoke( correctly called in the transaction. -Now parse the Pyth Lazer message. +Now parse the message received from Pyth Pro. ```rust copy // Deserialize and use the payload. @@ -200,14 +202,14 @@ state.latest_timestamp = data.timestamp_us.0; ``` - Pyth Lazer also provides + Pyth Pro/Lazer also provides [pyth_lazer_protocol](https://docs.rs/pyth-lazer-protocol/latest/pyth_lazer_protocol/) Rust crate, which allows consumers to parse the price updates off-chain. -### Subscribe to Pyth Lazer to receive Price Updates +### Subscribe to Pyth Pro to receive Price Updates -Pyth Lazer provides a websocket endpoint to receive price updates. Moreover, Pyth Lazer also provides a [typescript SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to subscribe to the websocket endpoint. +Pyth Pro/Lazer provides a websocket endpoint to receive price updates. Moreover, Pyth Pro/Lazer also provides a [typescript SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to subscribe to the websocket endpoint. Consult [How to subscribe to price updates from Pyth Lazer](../subscribe-price-updates.mdx) for a complete step-by-step guide. @@ -268,14 +270,14 @@ let mut tx = Transaction::new_with_payer( ## Additional Resources -You may find these additional resources helpful for integrating Pyth Lazer into your SVM smart contracts. +You may find these additional resources helpful for verifying price updates on your SVM smart contracts. ### Price Feed IDs -Pyth Lazer supports a wide range of price feeds. Consult the [Price Feed IDs](../price-feeds.mdx) page for a complete list of supported price feeds. +Pyth Pro supports a wide range of price feeds. Consult the [Price Feed IDs](../price-feed-ids.mdx) page for a complete list of supported price feeds. ### Examples -[pyth-lazer-example-solana](https://github.com/pyth-network/pyth-examples/tree/main/lazer/solana) is a simple example contract that parses and consumes price updates from Pyth Lazer. +[pyth-lazer-example-solana](https://github.com/pyth-network/pyth-examples/tree/main/lazer/solana) is a simple example contract that parses and consumes price updates from Pyth Pro. -[pyth-lazer-example-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Lazer websocket. +[pyth-lazer-example-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Pro websocket. diff --git a/pages/price-feeds/pro/integrate-as-publisher.mdx b/pages/price-feeds/pro/integrate-as-publisher.mdx new file mode 100644 index 00000000..830c264f --- /dev/null +++ b/pages/price-feeds/pro/integrate-as-publisher.mdx @@ -0,0 +1,3 @@ +# How to Integrate Pyth Pro as a Publisher + +We are working on this guide. Please check back later or contact us here if you wish to publish data on Pyth Pro. diff --git a/pages/lazer/payload-reference.mdx b/pages/price-feeds/pro/payload-reference.mdx similarity index 89% rename from pages/lazer/payload-reference.mdx rename to pages/price-feeds/pro/payload-reference.mdx index d6b027e5..c9645791 100644 --- a/pages/lazer/payload-reference.mdx +++ b/pages/price-feeds/pro/payload-reference.mdx @@ -1,18 +1,18 @@ import { Callout, Steps } from "nextra/components"; -# Lazer Payload Reference +# Pyth Pro Payload Reference -This page provides a comprehensive reference for understanding Pyth Lazer payload structure, field specifications, and available data formats. This information is essential for integrating with Lazer as a consumer and understanding the data you receive. +This page provides a comprehensive reference for understanding Pyth Pro payload structure, field specifications, and available data formats. This information is essential for integrating with Pyth Pro as a consumer and understanding the data you receive. This reference is designed for both technical and non-technical stakeholders - to understand Pyth Lazer's data offering. For implementation details, see our - [integration guides](/lazer/integrate-as-consumer). + to understand Pyth Pro's data offering. For implementation details, see our + [integration guides](/price-feeds/pro/integrate-as-consumer). -## What is a Lazer Payload? +## What is a Pyth Pro Payload? -A Lazer payload is a real-time data update containing financial market information with cryptographic signatures for verification. When you subscribe to Lazer price feeds, you receive `StreamUpdated` messages containing this structured data. +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. ## Stream Response Structure @@ -24,7 +24,7 @@ A Lazer payload is a real-time data update containing financial market informati request. -When you receive a `StreamUpdated` message from Lazer, it contains the following structure: +When you receive a `StreamUpdated` message from Pyth Pro, it contains the following structure: ### Top-Level Response Fields @@ -112,7 +112,7 @@ Main aggregate price calculated from all contributing publishers - **Type**: `optional non-zero i64` (mantissa representation) - **Availability**: Only included if requested in subscription properties -- **Algorithm**: Refer to [price aggregation](../../price-feeds/how-pyth-works/price-aggregation) for the current algorithm +- **Algorithm**: Refer to [price aggregation](../../price-feeds/core/how-pyth-works/price-aggregation) for the current algorithm - **Invariants**: Non-zero when present (null values filtered out) @@ -146,7 +146,7 @@ Confidence interval representing price uncertainty - **Type**: `optional i64` (mantissa representation) - **Availability**: Only included if requested in subscription properties -- **Algorithm**: Refer to [price aggregation](../../price-feeds/how-pyth-works/price-aggregation) for the current algorithm +- **Algorithm**: Refer to [price aggregation](../../price-feeds/core/how-pyth-works/price-aggregation) for the current algorithm - **Invariants**: Positive when present - **Usage**: Risk management and price quality assessment @@ -158,7 +158,7 @@ Highest bid price across all contributing publishers - **Type**: `optional non-zero i64` (mantissa representation) - **Availability**: Only included if requested in subscription properties -- **Algorithm**: Refer to [price aggregation](../../price-feeds/how-pyth-works/price-aggregation) for the current algorithm +- **Algorithm**: Refer to [price aggregation](../../price-feeds/core/how-pyth-works/price-aggregation) for the current algorithm - **Invariants**: Non-zero when present, typically ≤ current price #### Lowest Market Ask - `best_ask_price` @@ -167,7 +167,7 @@ Lowest ask price across all contributing publishers - **Type**: `optional non-zero i64` (mantissa representation) - **Availability**: Only included if requested in subscription properties -- **Algorithm**: Refer to [price aggregation](../../price-feeds/how-pyth-works/price-aggregation) for the current algorithm +- **Algorithm**: Refer to [price aggregation](../../price-feeds/core/how-pyth-works/price-aggregation) for the current algorithm - **Invariants**: Non-zero when present, typically ≥ current price ### Derivatives Properties (FundingRate Feed Type Only) @@ -221,7 +221,7 @@ Based on the [API documentation](https://pyth-lazer.dourolabs.app/docs), you can ## Subscription Channels -Lazer offers multiple delivery channels to match your latency and frequency requirements: +Pyth Pro offers multiple delivery channels to match your latency and frequency requirements: | Channel | Description | Use Cases | | ------------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------- | @@ -233,7 +233,7 @@ Lazer offers multiple delivery channels to match your latency and frequency requ ## Signature Schemes and Binary Formats -Lazer provides multiple cryptographic formats to support different blockchain ecosystems. When you subscribe, you can request specific binary formats in the `chains` parameter: +Pyth Pro provides multiple cryptographic formats to support different blockchain ecosystems. When you subscribe, you can request specific binary formats in the `chains` parameter:
diff --git a/pages/price-feeds/pro/price-feed-ids.mdx b/pages/price-feeds/pro/price-feed-ids.mdx new file mode 100644 index 00000000..88adfa0e --- /dev/null +++ b/pages/price-feeds/pro/price-feed-ids.mdx @@ -0,0 +1,14 @@ +import { LazerPriceIdTable } from "../../../components/LazerPriceIdTable"; +import { Callout } from "nextra/components"; + +# Pyth Pro Price Feeds + + + Pyth Pro Price Feed IDs **are different** from Pyth Core Price Feed IDs. + Please refer to the [Pyth Core Price Feed IDs](/price-feeds/core/price-feeds) + page for Pyth Core Price Feed IDs. + + +
+ + diff --git a/pages/lazer/subscribe-price-updates.mdx b/pages/price-feeds/pro/subscribe-price-updates.mdx similarity index 72% rename from pages/lazer/subscribe-price-updates.mdx rename to pages/price-feeds/pro/subscribe-price-updates.mdx index 92a78815..b8026706 100644 --- a/pages/lazer/subscribe-price-updates.mdx +++ b/pages/price-feeds/pro/subscribe-price-updates.mdx @@ -1,14 +1,16 @@ import { Callout, Steps } from "nextra/components"; -# How to Subscribe to Price Updates from Pyth Lazer +# How to Subscribe to Prices from Pyth Pro -This guide explains how to subscribe to price updates from Pyth Lazer. This guide will also explain various properties and configuration options to customize the price updates. +This guide explains how to subscribe to prices from Pyth Pro. +This guide will also explain various properties and configuration options to customize the prices. +**The return data also includes verified payloads that can be verified on the target blockchain.** -Subscribing to price updates is a three-step process: +Subscribing to prices is a three-step process: 1. **Acquire** an access token. 2. **Configure** subscription parameters. -3. **Subscribe** to the price updates via [websocket API](https://pyth-lazer.dourolabs.app/docs). +3. **Subscribe** to the prices via [websocket API](https://pyth-lazer.dourolabs.app/docs). The websocket server is available at `wss://pyth-lazer.dourolabs.app/v1/stream{:bash}`. @@ -22,7 +24,7 @@ Use the access token to authenticate the websocket connection by passing it as a ### 2. Configure subscription parameters -Lazer supports several request/subscription parameters to customize the received price updates. +Pyth Pro supports several request/subscription parameters to customize the received prices. These parameters are configured by sending a subscription message to the webservice. A sample request (using the Lazer SDK client -- see step 3) is shown below: @@ -40,7 +42,7 @@ client.send({ The most significant parameters are: - `subscriptionId` is an arbitrary numeric identifier for a subscription. It will be returned back in response by the server. It does not affect the signed payload. -- `priceFeedIds` is the list of price feeds to receive updates for. Data for all price feeds will be present in the signed price updates generated. Refer to the [Price Feed IDs list](./price-feed-ids.mdx) for the supported price feeds. +- `priceFeedIds` is the list of price feeds to receive price data for. It will also include the verified payloads for the price feeds. Refer to the [Price Feed IDs list](./price-feed-ids.mdx) for the supported price feeds. - `properties` is the list of properties to retrieve, such as **price**, **bestBidPrice**, **bestAskPrice**, etc. - `chains` is the list of chains to receive a signed payload for, such as **evm**, **solana**, etc. - `channel` determines the update rate: updates in the **real_time** channel are sent as frequently as possible, while **fixed_rate@200ms** and **fixed_rate@50ms** channels are updated at fixed rates. @@ -49,7 +51,7 @@ There are also a few other configuration parameters -- see the [API documentatio Determine the most suitable values for your application -- they will be used in the next step. -### 3. Subscribe to the price updates +### 3. Subscribe to the prices **Complete Payload Reference**: For understanding all fields and data types of @@ -57,7 +59,7 @@ Determine the most suitable values for your application -- they will be used in page. -To subscribe to the price updates, send a request to the websocket server. The server will respond with a signed price update. +To subscribe to the prices, send a request to the websocket server. The server will respond with a signed payload. 1. Pyth Lazer provides an [SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to seamlessly integrate the websocket API into your application. Install it using the following command: @@ -77,7 +79,7 @@ const client = await PythLazerClient.create( ); ``` -3. After the client is created, subscribe to updates (using the configuration parameters from step 2): +3. After the client is created, subscribe to prices (using the configuration parameters from step 2): ```js copy client.subscribe({ @@ -90,7 +92,7 @@ client.subscribe({ }); ``` -4. Once the connection is established, the server will start sending the price updates to the client: +4. Once the connection is established, the server will start sending the price and verified payloads to the client: ```js copy client.addMessageListener((message) => { @@ -98,7 +100,7 @@ client.addMessageListener((message) => { }); ``` -By default, price updates contain the `parsed` field that one can use to easily interpret the price update in their backend or frontend, as well as `evm` and/or `solana` fields that contain data that one should include in the on-chain transaction: +By default, verified payloads contain the `parsed` field that one can use to easily interpret the price data in their backend or frontend, as well as `evm` and/or `solana` fields that contain data that one should include in the on-chain transaction: ```json copy { @@ -128,12 +130,12 @@ By default, price updates contain the `parsed` field that one can use to easily ## Additional Resources -You may find these additional resources helpful for subscribing to price updates from Pyth Lazer. +You may find these additional resources helpful for subscribing to prices from Pyth Pro. ### Price Feed IDs -Pyth Lazer supports a wide range of price feeds. Consult the [Price Feed IDs](./price-feed-ids.mdx) page for a complete list of supported price feeds. +Pyth Pro supports a wide range of price feeds. Consult the [Price Feed IDs](./price-feed-ids.mdx) page for a complete list of supported price feeds. ### Examples -[pyth-lazer-example-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Lazer websocket. +[pyth-lazer-example-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Pro websocket. diff --git a/pages/price-feeds/pythnet-reference.mdx b/pages/price-feeds/pythnet-reference.mdx deleted file mode 100644 index b6254d57..00000000 --- a/pages/price-feeds/pythnet-reference.mdx +++ /dev/null @@ -1,7 +0,0 @@ -# Pythnet Reference - -The documentation in this section describes the structure of Pythnet accounts and their contents: - -- [Account Structure](/price-feeds/pythnet-reference/account-structure.mdx) describes the accounts that exist and their high-level contents -- [Product Metadata](/price-feeds/pythnet-reference/product-metadata.mdx) describes the metadata associated with each product account -- [Schedule Format](/price-feeds/pythnet-reference/schedule-format.mdx) describes the `schedule` field of the product metadata diff --git a/styles/styles.css b/styles/styles.css index 8fac3474..3dcf7049 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -120,5 +120,53 @@ .response p { @apply text-light !important; } + + /* Custom Banner Styling */ + .nextra-banner, + .nextra-banner-container, + .nextra-banner-container > div { + @apply relative overflow-hidden; + background: #764ba2 !important; + } + + .nextra-banner::before { + content: ""; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient( + 90deg, + transparent, + rgba(255, 255, 255, 0.2), + transparent + ); + animation: shimmer 3s infinite; + } + + @keyframes shimmer { + 0% { + left: -100%; + } + 100% { + left: 100%; + } + } + + .nextra-banner button[aria-label="Close banner"] { + @apply text-white/80 hover:text-white hover:bg-white/10 transition-all duration-200 rounded-md p-1; + } + + .nextra-banner button[aria-label="Close banner"]:hover { + @apply scale-110; + } + + /* Ensure banner works in both light and dark modes */ + html[class~="dark"] .nextra-banner, + html[class~="dark"] .nextra-banner-container, + html[class~="dark"] .nextra-banner-container > div { + background: #764ba2 !important; + } } } diff --git a/theme.config.tsx b/theme.config.tsx index bfc71c89..12e435f3 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -33,6 +33,23 @@ const config: DocsThemeConfig = { content: null, }, navigation: false, + banner: { + key: "pyth-pro-banner", + dismissible: true, + text: ( + + + + Trade in real time: Pyth Pro introduces 1 ms updates + + + + ), + }, useNextSeoProps() { return { titleTemplate: "%s – Pyth Network Documentation",