diff --git a/components/LazerPriceIdTable.tsx b/components/LazerPriceIdTable.tsx index 3c84214b..9733ba39 100644 --- a/components/LazerPriceIdTable.tsx +++ b/components/LazerPriceIdTable.tsx @@ -84,7 +84,7 @@ const LoadedLazerPriceIdTable = ({
Description Name Symbol - Pyth Lazer Id + Pyth Pro Id Exponent diff --git a/components/ProductCard.tsx b/components/ProductCard.tsx index a2a8f252..e0a0cbf6 100644 --- a/components/ProductCard.tsx +++ b/components/ProductCard.tsx @@ -14,6 +14,11 @@ interface ProductCardProps { ctaText: string; href: string; className?: string; + quickActions?: Array<{ + title: string; + href: string; + icon: React.ReactNode; + }>; } export function ProductCard({ @@ -26,6 +31,7 @@ export function ProductCard({ ctaText, href, className = "", + quickActions = [], }: ProductCardProps) { return (
+ {/* Quick Actions */} + {quickActions.length > 0 && ( +
+ {quickActions.map((action, index) => ( + +
+ {action.icon} +
+ + {action.title} + + + + + + ))} +
+ )} + {/* Call to action button - pushed to bottom */}
; } + +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 cc9b8b2e..b94ed880 100644 --- a/next.config.js +++ b/next.config.js @@ -121,6 +121,20 @@ const permanentRedirectArray = [ ], ["/benchmarks/api-instances", "/price-feeds/api-reference/"], ["/benchmarks/rate-limits", "/price-feeds/rate-limits/"], + + // 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*"], + + ["/price-feeds/:path((?!core|pro).*?)", "/price-feeds/core/:path*"], + + // // Price Feeds to Core Redirects - general catch-all (comes last) + // ["/price-feeds", "/price-feeds/core"], + // ["/price-feeds/:path*", "/price-feeds/core/: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..73929d5c 100644 --- a/pages/home/index.mdx +++ b/pages/home/index.mdx @@ -33,22 +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" -/> - -{" "} - } @@ -83,7 +67,6 @@ Pyth Network is the leading oracle protocol that connects the owners of market d Get started with Pyth Network by exploring our comprehensive documentation: - **[Price Feeds Getting Started](../price-feeds/getting-started)** - Integrate real-time price data -- **[Lazer Documentation](../lazer)** - High-performance price feeds - **[Express Relay Integration](../express-relay)** - Better orderflow mechanism to eliminate MEV - **[Entropy Implementation](../entropy)** - Secure randomness generation diff --git a/pages/lazer/how-lazer-works.mdx b/pages/lazer/how-lazer-works.mdx deleted file mode 100644 index ea314c0e..00000000 --- a/pages/lazer/how-lazer-works.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# How Pyth Lazer works - -Pyth Lazer 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 Lazer works. Details will be added here as they are completed. diff --git a/pages/lazer/index.mdx b/pages/lazer/index.mdx deleted file mode 100644 index e9819a7f..00000000 --- a/pages/lazer/index.mdx +++ /dev/null @@ -1,20 +0,0 @@ -import Image from "next/image"; - -# Pyth Lazer - -Pyth Lazer is a low latency, highly customizable price oracle. -It offers a customizable set of price feeds, target chains (EVM or Solana) and channels (real time or fixed rate): - -- Real time channels send updates as frequently as they become available; -- Fixed rate channels send updates at fixed time intervals (you can choose between 50 ms or 200 ms). - -The table below shows the difference between Pyth Core and Pyth Lazer: - -| | **Pyth Core** | **Pyth Lazer** | -| ----------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| **Solution Type** | Stable, secure, and decentralized price data source for a broad spectrum of DeFi or TradFi applications. | **Permissioned** service focused on **ultra-low-latency** price and market data for highly latency-sensitive users. | -| **Frequency** | 400ms on Pythnet appchain with support for risk mitigation via Benchmarks and confidence intervals. | **1ms** (**real-time**), 50ms, and 200ms channels, **customizable** frequencies, and throttling support to address different needs. | -| **Data Types** | Aggregate price and confidence intervals. | Aggregate price, bid/ask price, and **customizable** market data (market depth and more). | -| **Fees** | On-chain fee per signed cross-chain price update. | On-chain fee per signed cross-chain price update. | -| **Update Costs** | >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 8e90c268..c519766d 100644 --- a/pages/price-feeds/_meta.json +++ b/pages/price-feeds/_meta.json @@ -1,64 +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": "/price-feeds/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", - "sponsored-feeds": "Sponsored 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?", - "how-pyth-works": "How Pyth Works" + "core": { + "title": "Pyth Core →", + "href": "/price-feeds/core" + } } diff --git a/pages/price-feeds/core/_meta.json b/pages/price-feeds/core/_meta.json new file mode 100644 index 00000000..74d304fc --- /dev/null +++ b/pages/price-feeds/core/_meta.json @@ -0,0 +1,55 @@ +{ + "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", + "sponsored-feeds": "Sponsored 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?", + "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 7d24ef79..4fc23b97 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 93% rename from pages/price-feeds/contract-addresses/ton.mdx rename to pages/price-feeds/core/contract-addresses/ton.mdx index 755d1ed9..1fe42161 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 100% 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 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 100% 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 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 86% rename from pages/price-feeds/getting-started.mdx rename to pages/price-feeds/core/getting-started.mdx index ef96ef3c..a1b9ae72 100644 --- a/pages/price-feeds/getting-started.mdx +++ b/pages/price-feeds/core/getting-started.mdx @@ -1,14 +1,14 @@ # Getting Started -Integrating Pyth price feeds is quick and easy. Pyth price feeds are permissionless and available on-chain. You **don't** need to sign up or request an API key +Integrating Pyth price feeds is quick and easy. Pyth price feeds are permissionless and available on-chain. You **don't** need to sign up or request an API key to use **Pyth Core.** -Pyth offers several different resources to help you get started. +Pyth Core offers several different resources to help you get started. The [Build](#build) section provides resources for developers integrating Pyth price feeds into their applications. The [Learn](#learn) section provides general material for anyone interested in understanding how the protocol works. ## Build -Developers interested in using Pyth can refer to the following resources: +Developers interested in using Pyth Core can refer to the following resources: - [Create Your First Pyth App](./create-your-first-pyth-app/) is a tutorial that walks the reader through all of the steps required to develop, test and deploy a contract using Pyth price feeds. This guide is tailored toward new developers with less contract development experience. - [Use Real-Time Price Data](./use-real-time-data/) is a how-to guide that provides the minimal steps to integrate price feeds into your app. This guide is targeted towards more experienced developers who know the basics of smart contract development. @@ -21,6 +21,7 @@ In addition to the resources above, the following reference materials will be us - [Contract Addresses](./contract-addresses/) provides the contract addresses for Pyth on different chains. - [Error Codes](./error-codes.mdx) lists the error codes that can be returned by the Pyth contracts. - [Best Practices](./best-practices.mdx) explains how to use Pyth price feeds safely and effectively in your application. +- [Sponsored Feeds](./sponsored-feeds.mdx) lists the price feeds that are sponsored(pushed) by the Pyth Data Association. ## Learn 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 93% 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..046765d2 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,9 @@ 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) +import PullArchitectureHermes from "/images/Pull-Architecture-Hermes.png"; + +Pull Architecture Hermes 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 91% 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..03b4cfad 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,9 @@ 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) +import EMAPriceAggregation1 from "/images/EMA_Price_Aggregation_1.png"; + +EMA Price Aggregation 1 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 +40,8 @@ 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) +import EMAPriceAggregation2 from "/images/EMA_Price_Aggregation_2.png"; + +EMA Price Aggregation 2 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 100% rename from pages/price-feeds/how-pyth-works/hermes.mdx rename to pages/price-feeds/core/how-pyth-works/hermes.mdx 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 84% 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..1233d6d5 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,15 @@ 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) +import PriceAggregation1 from "/images/Price_Aggregation_1.png"; + +Price Aggregation 1 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) +import PriceAggregation2 from "/images/Price_Aggregation_2.png"; + +Price Aggregation 2 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 +22,9 @@ 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) +import PriceAggregation3 from "/images/Price_Aggregation_3.png"; + +Price Aggregation 3 **Algorithm** @@ -41,21 +47,29 @@ 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) +import PriceAggregation4 from "/images/Price_Aggregation_4.png"; + +Price Aggregation 4 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) +import PriceAggregation5 from "/images/Price_Aggregation_5.png"; + +Price Aggregation 5 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) +import PriceAggregation6 from "/images/Price_Aggregation_6.png"; + +Price Aggregation 6 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) +import PriceAggregation7 from "/images/Price_Aggregation_7.png"; + +Price Aggregation 7 **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..96608187 --- /dev/null +++ b/pages/price-feeds/core/index.mdx @@ -0,0 +1,73 @@ +import { ProductCard } from "../../../components/ProductCard"; +import { + BarChartIcon, + ClockIcon, + LightningIcon, + MultiChainIcon, + ShieldIcon, + ListIcon, +} from "../../../components/icons/ProductIcons"; +import { Cards, Card } from "nextra/components"; + +# Introduction to Pyth Core + +Pyth Core is the decentralized Pyth oracle delivering financial market data to smart contracts across 100+ blockchains. +Data is contributed directly by 120+ first-party publishers, including leading exchanges and trading firms. + +## Key Features + +- **2000+ price feeds** across all major asset classes +- **400ms update frequency** with high-frequency updates +- **Cryptographically signed** and verifiable on-chain +- **Decentralized** access across **100+ blockchains** including EVM, Cosmos, Solana, Aptos, and more + +## Our Products + +
+ } + title="Real-Time Price Feeds" + description="Real-time, high-fidelity market data for smart contracts." + features={[ + { icon: , text: "400ms update frequency" }, + { icon: , text: "Pull and Push updates" }, + { icon: , text: "Multi-chain support" } + ]} + ctaText="Explore Price Feeds" + href="./price-feeds/use-real-time-data" + /> + +{" "} + +} + 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" +/> +
+ +## Quick Start + + + } title="Price Feed IDs" href="./price-feeds" /> + } + title="Contract Addresses" + href="./contract-addresses" + /> + } + title="Sponsored Feeds(Push Updates)" + href="./sponsored-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 100% 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 diff --git a/pages/price-feeds/price-feeds.mdx b/pages/price-feeds/core/price-feeds.mdx similarity index 86% rename from pages/price-feeds/price-feeds.mdx rename to pages/price-feeds/core/price-feeds.mdx index e8b5b086..0ea6562b 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 @@ -10,6 +10,12 @@ These specific pairs are part of an asset class, which is a broader category of Anyone can fetch available price feeds and their IDs via [Hermes API](https://hermes.pyth.network/docs/#/rest/price_feeds_metadata). + + Pyth Core Price Feed IDs **are different** from Pyth Pro Price Feed IDs. + Please refer to the [Pyth Pro Price Feed IDs](../pro/price-feed-ids) page for + Pyth Pro Price Feed IDs. + + ## Asset Classes Every price feed belongs to an asset class. These asset classes distinguish between different types of assets, such as crypto, US equities, and metals. diff --git a/pages/price-feeds/price-feeds/_meta.json b/pages/price-feeds/core/price-feeds/_meta.json similarity index 100% rename from pages/price-feeds/price-feeds/_meta.json rename to pages/price-feeds/core/price-feeds/_meta.json 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/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..18810cd9 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..019a2ef3 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/pythnet-reference.mdx b/pages/price-feeds/core/pythnet-reference.mdx similarity index 100% rename from pages/price-feeds/pythnet-reference.mdx rename to pages/price-feeds/core/pythnet-reference.mdx 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 100% rename from pages/price-feeds/schedule-price-updates.mdx rename to pages/price-feeds/core/schedule-price-updates.mdx 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..3498a8be 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-scheduler.mdx b/pages/price-feeds/core/schedule-price-updates/using-scheduler.mdx similarity index 100% rename from pages/price-feeds/schedule-price-updates/using-scheduler.mdx rename to pages/price-feeds/core/schedule-price-updates/using-scheduler.mdx diff --git a/pages/price-feeds/sponsored-feeds.mdx b/pages/price-feeds/core/sponsored-feeds.mdx similarity index 100% rename from pages/price-feeds/sponsored-feeds.mdx rename to pages/price-feeds/core/sponsored-feeds.mdx diff --git a/pages/price-feeds/sponsored-feeds/_meta.json b/pages/price-feeds/core/sponsored-feeds/_meta.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/_meta.json rename to pages/price-feeds/core/sponsored-feeds/_meta.json diff --git a/pages/price-feeds/sponsored-feeds/aptos.mdx b/pages/price-feeds/core/sponsored-feeds/aptos.mdx similarity index 68% rename from pages/price-feeds/sponsored-feeds/aptos.mdx rename to pages/price-feeds/core/sponsored-feeds/aptos.mdx index 15e020aa..8ea140b7 100644 --- a/pages/price-feeds/sponsored-feeds/aptos.mdx +++ b/pages/price-feeds/core/sponsored-feeds/aptos.mdx @@ -1,4 +1,4 @@ -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import aptosMainnet from "../sponsored-feeds/data/aptos/aptos_mainnet.json"; # Sponsored Feeds on Aptos diff --git a/pages/price-feeds/sponsored-feeds/data/aptos/aptos_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/aptos/aptos_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/aptos/aptos_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/aptos/aptos_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/arbitrum_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/arbitrum_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/arbitrum_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/arbitrum_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/avalanche_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/avalanche_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/avalanche_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/avalanche_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/base_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/base_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/base_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/base_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/berachain_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/berachain_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/berachain_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/berachain_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/ethereum_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/ethereum_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/ethereum_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/ethereum_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/hyperevm_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/hyperevm_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/hyperevm_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/hyperevm_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/linea_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/linea_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/linea_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/linea_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/soneium_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/soneium_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/soneium_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/soneium_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/evm/sonic_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/evm/sonic_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/evm/sonic_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/evm/sonic_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/movement/movement_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/movement/movement_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/movement/movement_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/movement/movement_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/sui/sui_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/sui/sui_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/sui/sui_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/sui/sui_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/svm/fogo_testnet.json b/pages/price-feeds/core/sponsored-feeds/data/svm/fogo_testnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/svm/fogo_testnet.json rename to pages/price-feeds/core/sponsored-feeds/data/svm/fogo_testnet.json diff --git a/pages/price-feeds/sponsored-feeds/data/svm/solana_mainnet.json b/pages/price-feeds/core/sponsored-feeds/data/svm/solana_mainnet.json similarity index 100% rename from pages/price-feeds/sponsored-feeds/data/svm/solana_mainnet.json rename to pages/price-feeds/core/sponsored-feeds/data/svm/solana_mainnet.json diff --git a/pages/price-feeds/sponsored-feeds/evm.mdx b/pages/price-feeds/core/sponsored-feeds/evm.mdx similarity index 95% rename from pages/price-feeds/sponsored-feeds/evm.mdx rename to pages/price-feeds/core/sponsored-feeds/evm.mdx index 4ec74a86..3875de14 100644 --- a/pages/price-feeds/sponsored-feeds/evm.mdx +++ b/pages/price-feeds/core/sponsored-feeds/evm.mdx @@ -1,4 +1,4 @@ -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import arbitrumMainnet from "../sponsored-feeds/data/evm/arbitrum_mainnet.json"; import avalancheMainnet from "../sponsored-feeds/data/evm/avalanche_mainnet.json"; import baseMainnet from "../sponsored-feeds/data/evm/base_mainnet.json"; diff --git a/pages/price-feeds/sponsored-feeds/fogo.mdx b/pages/price-feeds/core/sponsored-feeds/fogo.mdx similarity index 67% rename from pages/price-feeds/sponsored-feeds/fogo.mdx rename to pages/price-feeds/core/sponsored-feeds/fogo.mdx index fd9e3a94..b8b1b389 100644 --- a/pages/price-feeds/sponsored-feeds/fogo.mdx +++ b/pages/price-feeds/core/sponsored-feeds/fogo.mdx @@ -1,4 +1,4 @@ -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import fogoTestnet from "../sponsored-feeds/data/svm/fogo_testnet.json"; # Sponsored Feeds on Fogo diff --git a/pages/price-feeds/sponsored-feeds/movement.mdx b/pages/price-feeds/core/sponsored-feeds/movement.mdx similarity index 70% rename from pages/price-feeds/sponsored-feeds/movement.mdx rename to pages/price-feeds/core/sponsored-feeds/movement.mdx index 0b8d9e46..cd71acee 100644 --- a/pages/price-feeds/sponsored-feeds/movement.mdx +++ b/pages/price-feeds/core/sponsored-feeds/movement.mdx @@ -1,4 +1,4 @@ -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import movementMainnet from "../sponsored-feeds/data/movement/movement_mainnet.json"; # Sponsored Feeds on Movement diff --git a/pages/price-feeds/sponsored-feeds/solana.mdx b/pages/price-feeds/core/sponsored-feeds/solana.mdx similarity index 77% rename from pages/price-feeds/sponsored-feeds/solana.mdx rename to pages/price-feeds/core/sponsored-feeds/solana.mdx index 2b321aea..3c487baf 100644 --- a/pages/price-feeds/sponsored-feeds/solana.mdx +++ b/pages/price-feeds/core/sponsored-feeds/solana.mdx @@ -1,4 +1,4 @@ -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import solanaMainnet from "../sponsored-feeds/data/svm/solana_mainnet.json"; # Sponsored Feeds on Solana diff --git a/pages/price-feeds/sponsored-feeds/sui.mdx b/pages/price-feeds/core/sponsored-feeds/sui.mdx similarity index 67% rename from pages/price-feeds/sponsored-feeds/sui.mdx rename to pages/price-feeds/core/sponsored-feeds/sui.mdx index 9b761dfc..b543c341 100644 --- a/pages/price-feeds/sponsored-feeds/sui.mdx +++ b/pages/price-feeds/core/sponsored-feeds/sui.mdx @@ -1,4 +1,4 @@ -import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import { SponsoredFeedsTable } from "../../../../components/SponsoredFeedsTableWithData"; import suiMainnet from "../sponsored-feeds/data/sui/sui_mainnet.json"; # Sponsored Feeds on Sui 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 100% rename from pages/price-feeds/use-pyth-for-morpho.mdx rename to pages/price-feeds/core/use-pyth-for-morpho.mdx 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/aptos.mdx b/pages/price-feeds/core/use-real-time-data/aptos.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/aptos.mdx rename to pages/price-feeds/core/use-real-time-data/aptos.mdx diff --git a/pages/price-feeds/use-real-time-data/cosmwasm.mdx b/pages/price-feeds/core/use-real-time-data/cosmwasm.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/cosmwasm.mdx rename to pages/price-feeds/core/use-real-time-data/cosmwasm.mdx diff --git a/pages/price-feeds/use-real-time-data/evm.mdx b/pages/price-feeds/core/use-real-time-data/evm.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/evm.mdx rename to pages/price-feeds/core/use-real-time-data/evm.mdx diff --git a/pages/price-feeds/use-real-time-data/fuel.mdx b/pages/price-feeds/core/use-real-time-data/fuel.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/fuel.mdx rename to pages/price-feeds/core/use-real-time-data/fuel.mdx diff --git a/pages/price-feeds/use-real-time-data/iota.mdx b/pages/price-feeds/core/use-real-time-data/iota.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/iota.mdx rename to pages/price-feeds/core/use-real-time-data/iota.mdx diff --git a/pages/price-feeds/use-real-time-data/near.mdx b/pages/price-feeds/core/use-real-time-data/near.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/near.mdx rename to pages/price-feeds/core/use-real-time-data/near.mdx diff --git a/pages/price-feeds/use-real-time-data/off-chain.mdx b/pages/price-feeds/core/use-real-time-data/off-chain.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/off-chain.mdx rename to pages/price-feeds/core/use-real-time-data/off-chain.mdx diff --git a/pages/price-feeds/use-real-time-data/solana.mdx b/pages/price-feeds/core/use-real-time-data/solana.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/solana.mdx rename to pages/price-feeds/core/use-real-time-data/solana.mdx diff --git a/pages/price-feeds/use-real-time-data/stacks.mdx b/pages/price-feeds/core/use-real-time-data/stacks.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/stacks.mdx rename to pages/price-feeds/core/use-real-time-data/stacks.mdx diff --git a/pages/price-feeds/use-real-time-data/starknet.mdx b/pages/price-feeds/core/use-real-time-data/starknet.mdx similarity index 97% rename from pages/price-feeds/use-real-time-data/starknet.mdx rename to pages/price-feeds/core/use-real-time-data/starknet.mdx index dfb901f8..8d2fe277 100644 --- a/pages/price-feeds/use-real-time-data/starknet.mdx +++ b/pages/price-feeds/core/use-real-time-data/starknet.mdx @@ -21,15 +21,9 @@ Pyth also provides a javascript SDK to interact with the Pyth contract on Starkn - ```sh copy - npm install --save @pythnetwork/pyth-starknet-js - ``` - - - ```sh copy - yarn add @pythnetwork/pyth-starknet-js - ``` + ```sh copy npm install --save @pythnetwork/pyth-starknet-js ``` + ```sh copy yarn add @pythnetwork/pyth-starknet-js ``` ## Write Contract Code diff --git a/pages/price-feeds/use-real-time-data/sui.mdx b/pages/price-feeds/core/use-real-time-data/sui.mdx similarity index 100% rename from pages/price-feeds/use-real-time-data/sui.mdx rename to pages/price-feeds/core/use-real-time-data/sui.mdx diff --git a/pages/price-feeds/use-real-time-data/ton.mdx b/pages/price-feeds/core/use-real-time-data/ton.mdx similarity index 96% rename from pages/price-feeds/use-real-time-data/ton.mdx rename to pages/price-feeds/core/use-real-time-data/ton.mdx index 53dd0473..1fc956e1 100644 --- a/pages/price-feeds/use-real-time-data/ton.mdx +++ b/pages/price-feeds/core/use-real-time-data/ton.mdx @@ -1,7 +1,3 @@ ---- -description: Consume Pyth Network prices in TON applications ---- - import { Tabs } from "nextra/components"; # How to Use Real-Time Data in TON Contracts @@ -14,15 +10,15 @@ Install the Pyth TON SDK and other necessary dependencies using npm: - ```sh copy + ```bash copy npm install @pythnetwork/pyth-ton-js @pythnetwork/hermes-client - @ton/core @ton/ton @ton/crypto + @ton/core @ton/ton @ton/crypto ``` - ```sh copy + ```bash copy yarn add @pythnetwork/pyth-ton-js @pythnetwork/hermes-client - @ton/core @ton/ton @ton/crypto + @ton/core @ton/ton @ton/crypto ``` diff --git a/pages/price-feeds/index.mdx b/pages/price-feeds/index.mdx index 354dd122..00d9a826 100644 --- a/pages/price-feeds/index.mdx +++ b/pages/price-feeds/index.mdx @@ -5,70 +5,120 @@ import { LightningIcon, MultiChainIcon, ShieldIcon, + CodeIcon, + ListIcon, + KeyIcon, + PlayIcon, + MoneyWavyIcon, } from "../../components/icons/ProductIcons"; -# 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 -- **1600+ 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 +Pyth offers two main versions of price feeds, each optimized for different use cases: +
- } - title="Real-Time Price Feeds" - description="Real-time, high-fidelity market data for smart contracts." +} + title="Pyth Pro" + description={<>Subscription-based price data for institutions and advanced use cases.
Previously known as Lazer.} features={[ - { icon: , text: "Real-time price feeds" }, - { icon: , text: "High-frequency data" }, - { icon: , text: "Multi-chain support" } + { icon: , text: "Ultra-low latency" }, + { icon: , text: "Crypto, Equities & Indexes" }, + { icon: , text: "Customizable channels and latency" }, + { icon: , text: "Dedicated support" } ]} - ctaText="Explore Price Feeds" - href="./price-feeds/use-real-time-data" + quickActions={[ + { icon: , title: "Available Price Feeds", href: "./price-feeds/pro/price-feed-ids" }, + { icon: , title: "Get an access token", href: "https://tally.so/r/nP2lG5" }, + { icon: , title: "Pricing", href: "https://www.pyth.network/pricing" }, + ]} + ctaText="Explore Pro Documentation" + href="./price-feeds/pro" /> {" "} } - title="Historical Data" - description="Access to historical price data for settlement and backtesting." + badge="Core" + badgeColor="bg-green-600" + icon={} + title="Pyth Core" + description="The original Pyth oracle: decentralized price feeds for DeFi and TradFi builders." features={[ - { icon: , text: "Signed data" }, - { icon: , text: "Verifiable prices" }, - { icon: , text: "Time-stamped prices" }, + { 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="Access Historical Data" - href="./price-feeds/use-historic-price-data" + ctaText="Explore Core Documentation" + href="./price-feeds/core" /> - } - 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" - />
-## Quick Start +## Additional Resources + +
+
+

Price Feed IDs

+

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

+ Pyth Core IDs → + | + Pyth Pro IDs → +
-Follow the [Getting Started](price-feeds/getting-started.mdx) guide to integrate Pyth Price Feeds into your application. +{" "} + +
+

+ API Reference +

+

+ Complete API documentation for both Pro and Core. +

+ + Core APIs → + + | + + Pro API → + +
-For contract addresses and deployment details, see [Contract Addresses](./price-feeds/contract-addresses). +
+

Examples

+

Sample applications and integration examples.

+ View Examples → +
+
diff --git a/pages/lazer/_meta.json b/pages/price-feeds/pro/_meta.json similarity index 71% rename from pages/lazer/_meta.json rename to pages/price-feeds/pro/_meta.json index 15bf7d81..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", @@ -38,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 76% rename from pages/lazer/acquire-access-token.mdx rename to pages/price-feeds/pro/acquire-access-token.mdx index 5e3e9334..361f53e4 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/nP2lG5) 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 updates](./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 74% rename from pages/lazer/getting-started.mdx rename to pages/price-feeds/pro/getting-started.mdx index b1a7b38d..39220032 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](./websocket-api-reference). + ## 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..4c20dc2d --- /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="./acquire-access-token" + /> + } + title="Subscribe to prices" + href="./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..0b311d2d 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-feeds.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/price-feeds/pro/price-feed-ids.mdx b/pages/price-feeds/pro/price-feed-ids.mdx new file mode 100644 index 00000000..ecf7de42 --- /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](../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 71% rename from pages/lazer/subscribe-price-updates.mdx rename to pages/price-feeds/pro/subscribe-price-updates.mdx index 06ecb029..2deb9150 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,9 +51,9 @@ 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 -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: @@ -71,7 +73,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({ @@ -84,7 +86,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) => { @@ -92,7 +94,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 { @@ -122,12 +124,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/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",