diff --git a/apps/developer-hub/content/docs/entropy/chainlist.mdx b/apps/developer-hub/content/docs/entropy/chainlist.mdx index 183d36d7f6..e849398e1f 100644 --- a/apps/developer-hub/content/docs/entropy/chainlist.mdx +++ b/apps/developer-hub/content/docs/entropy/chainlist.mdx @@ -8,12 +8,10 @@ import { EntropyTable } from "../../../src/components/EntropyTable"; ## Mainnets - -
- The fees for mainnet are dynamically set. Always use the on-chain method - `entropy.getFeeV2()` to get the current fee. -
-
+ + The fees for mainnet are dynamically set. Always use the on-chain method + `entropy.getFeeV2()` to get the current fee. + The following tables shows the total fees payable when using the **default provider**. Note that the fees shown below will vary over time with prevailing gas prices on each chain. @@ -32,12 +30,10 @@ Entropy callbacks the consumer as part of this transaction. ## Testnets - -
- The fees for testnets are kept deliberately low and different from the - mainnet fees. -
-
+ + The fees for testnets are kept deliberately low and different from the mainnet + fees. + The Entropy contract is deployed on the following testnet chains: diff --git a/apps/developer-hub/content/docs/entropy/fees.mdx b/apps/developer-hub/content/docs/entropy/fees.mdx index 347ef78fd6..eb7cec9e08 100644 --- a/apps/developer-hub/content/docs/entropy/fees.mdx +++ b/apps/developer-hub/content/docs/entropy/fees.mdx @@ -17,4 +17,4 @@ Note that protocols integrating with Entropy can pass these fees along to their submits a transaction that requests a random number, the user can directly pay the entropy fees required with the native blockchain token. There are no fees for revealing the random numbers. -You can check the current fees in the [chainlist and fee details](./entropy/chainlist) page for each blockchain. +You can check the current fees in the [chainlist and fee details](./chainlist) page for each blockchain. diff --git a/apps/developer-hub/content/docs/entropy/generate-random-numbers-evm.mdx b/apps/developer-hub/content/docs/entropy/generate-random-numbers-evm.mdx index 1db75566d4..4a0a096a38 100644 --- a/apps/developer-hub/content/docs/entropy/generate-random-numbers-evm.mdx +++ b/apps/developer-hub/content/docs/entropy/generate-random-numbers-evm.mdx @@ -147,7 +147,7 @@ IEntropyV2 entropy; When the final random number is ready to use, the entropyCallback function will be called by the Entropy contract. This will happen in a separate transaction submitted by the requested provider. - + The `entropyCallback` function on your contract should **never** return an error. If it returns an error, the keeper will not be able to invoke the callback. If you are having problems receiving the callback, please see diff --git a/apps/developer-hub/content/docs/entropy/set-custom-gas-limits.mdx b/apps/developer-hub/content/docs/entropy/set-custom-gas-limits.mdx index bfaa8c7f82..3c61ef7f05 100644 --- a/apps/developer-hub/content/docs/entropy/set-custom-gas-limits.mdx +++ b/apps/developer-hub/content/docs/entropy/set-custom-gas-limits.mdx @@ -127,7 +127,7 @@ mapping(uint64 => bool) public processedRequests; When setting custom gas limits, be aware of these constraints: - + Gas limits are automatically rounded up to the nearest multiple of **10,000**. Example: 19,000 becomes 20,000 25,500 becomes 30,000. The minimum gas limit is the provider's configured default limit. The maximum gas limit is 655,350,000 @@ -169,7 +169,7 @@ uint32 customGasLimit = estimatedGas + safetyBuffer; Be prepared to handle cases where your gas limit is insufficient: - + If your callback **runs out of gas**, the entropy provider will **not** be able to complete the callback. Always test your gas limits thoroughly and include adequate safety margins. diff --git a/apps/developer-hub/content/docs/entropy/whats-new-entropyv2.mdx b/apps/developer-hub/content/docs/entropy/whats-new-entropyv2.mdx index 44b09268e3..b52c82d900 100644 --- a/apps/developer-hub/content/docs/entropy/whats-new-entropyv2.mdx +++ b/apps/developer-hub/content/docs/entropy/whats-new-entropyv2.mdx @@ -22,7 +22,6 @@ Each of these request types is described in more detail with examples in [Reques ### 2. Enhanced Callback Status Entropy V2 introduces callback statuses, which allow users to track the status of their callbacks. - [Pyth Dev-Forum Announcement](https://dev-forum.pyth.network/t/announcing-entropy-v2/324#p-649-enhanced-callback-statuses-2) provides more details on enhanced callback statuses. ### 3. Entropy Explorer diff --git a/apps/developer-hub/content/docs/express-relay/contract-addresses.mdx b/apps/developer-hub/content/docs/express-relay/contract-addresses.mdx index fa1b39ccda..9b4474b916 100644 --- a/apps/developer-hub/content/docs/express-relay/contract-addresses.mdx +++ b/apps/developer-hub/content/docs/express-relay/contract-addresses.mdx @@ -22,7 +22,7 @@ description: >- - + To simulate real performance conditions and activity, the staging/testing environment for Solana is on the mainnet-beta network. This environment is not for production use and should only be used for testing. diff --git a/apps/developer-hub/content/docs/metrics/kpi.mdx b/apps/developer-hub/content/docs/metrics/kpi.mdx index 18a951daaa..08d24c70b4 100644 --- a/apps/developer-hub/content/docs/metrics/kpi.mdx +++ b/apps/developer-hub/content/docs/metrics/kpi.mdx @@ -3,14 +3,14 @@ title: Pyth Network KPI description: Monthly informative data points on the Pyth network, its growth, and performance metrics. --- - + For the latest KPI dashboard, please visit [https://kpi.pyth.network/](https://kpi.pyth.network/). Every month, the Pyth contributors collect informative data points on the network, its growth, as well as its performance. - + All figures mentioned are just rough estimations. Due to Pyth's permissionless nature, any apps can use the Pyth price feeds without talking to the Pyth contributors. This will exclude them from the calculations. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers.mdx b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers.mdx similarity index 65% rename from apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers.mdx rename to apps/developer-hub/content/docs/price-feeds/api-instances-and-providers.mdx index 1f071b2cb0..2be2cbb4a8 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers.mdx +++ b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers.mdx @@ -1,10 +1,7 @@ --- -title: "Access Hermes & Pythnet RPC: Developer API Guide" -description: >- - Streamline integration of Pyth Price Feeds with Hermes and Pythnet RPC. Choose - self-hosted or third-party instances to boost development efficiency. -full: false -index: false +title: API Instances and Providers +description: Guide to accessing Hermes and Pythnet RPC instances through self-hosting or third-party providers +icon: Globe --- # API Instances and Providers diff --git a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/_meta.json b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/_meta.json similarity index 53% rename from apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/_meta.json rename to apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/_meta.json index c7c060d649..4182c0264f 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/_meta.json +++ b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/_meta.json @@ -1,4 +1,5 @@ { "hermes": "Hermes", + "benchmarks": "Benchmarks / Historical Prices", "pythnet-rpc": "Pythnet RPC" } diff --git a/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/benchmarks.mdx b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/benchmarks.mdx new file mode 100644 index 0000000000..3c34fb06d0 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/benchmarks.mdx @@ -0,0 +1,15 @@ +--- +title: "Benchmarks API Instances" +description: "Access public instances of the Pyth Benchmarks API for retrieving historical price data and performance metrics." +icon: "ChartLineUp" +--- + +# Benchmarks API Instances + +The Pyth Data Association hosts a public instance of the Benchmarks API at the following URL: + +| Channel | URL | +| ------- | ------------------------------- | +| Stable | https://benchmarks.pyth.network | + +There is currently no Benchmarks instance for the Beta channel. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/hermes.mdx b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/hermes.mdx similarity index 66% rename from apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/hermes.mdx rename to apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/hermes.mdx index f06cfac13d..f837c183e4 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/hermes.mdx +++ b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/hermes.mdx @@ -1,13 +1,3 @@ ---- -title: "Hermes: Open-Source Service for Pyth Price Updates" -description: >- - Experience real-time Pyth price feeds with Hermes: an open-source REST and - streaming API. Use public endpoints or self-host for reliable, decentralized - data. -full: false -index: false ---- - # Hermes Hermes is an open-source service that listens to the Pythnet and the Wormhole Network for Pyth price updates, and @@ -23,16 +13,22 @@ Network: URL: https://hermes.pyth.network - -
For developers building on **Aptos testnet**, **Sui testnet** or **Near testnet**, please use the Hermes Beta endpoint:
+ +For developers building on **Aptos testnet**, **Sui testnet** or **Near testnet**, please use the Hermes Beta endpoint: + +URL: https://hermes-beta.pyth.network + + -
URL: https://hermes-beta.pyth.network
+### Rate limits -
+In order to maximize the reliability of the Public Hermes API, a request rate limit is enforced. +All endpoints limits are set at 30 requests every 10 seconds per IP address. +Clients issuing request above the limit will receive a 429 (Too Many Requests) response for the subsequent 60-second period. For production deployments, developers integrating with Pyth Network are **strongly encouraged** to use Node Providers for maximum resilience and decentralization. Moreover, Hermes is designed to be self-hosted, so developers can run their own -instance of Hermes to fetch Pyth price updates. Please note it is not recommended to use the public endpoint for production as it has rate limits. +instance of Hermes to fetch Pyth price updates. ## Node Providers diff --git a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/pythnet-rpc.mdx b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/pythnet-rpc.mdx similarity index 65% rename from apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/pythnet-rpc.mdx rename to apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/pythnet-rpc.mdx index 9e63db6d5a..ad87faf291 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/api-instances-and-providers/pythnet-rpc.mdx +++ b/apps/developer-hub/content/docs/price-feeds/api-instances-and-providers/pythnet-rpc.mdx @@ -1,12 +1,3 @@ ---- -title: "Pythnet RPC: How to Access and Use for Developers" -description: >- - Use Hermes to configure Pythnet RPC. Choose from trusted providers like Triton - or P2P, or self-host a node for secure, reliable data access. -full: false -index: false ---- - # Pythnet RPC You will need a Pythnet RPC to run Hermes, which you can obtain from any of the Pythnet RPC diff --git a/apps/developer-hub/content/docs/price-feeds/v1/api-reference.mdx b/apps/developer-hub/content/docs/price-feeds/api-reference.mdx similarity index 64% rename from apps/developer-hub/content/docs/price-feeds/v1/api-reference.mdx rename to apps/developer-hub/content/docs/price-feeds/api-reference.mdx index c93bbd504d..8be7ac516f 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/api-reference.mdx +++ b/apps/developer-hub/content/docs/price-feeds/api-reference.mdx @@ -1,11 +1,7 @@ --- -title: "Pyth API Reference: On- and Off-Chain Developer Tools" -description: >- - Pyth Core’s API reference covers EVM, Aptos, CosmWasm, and Hermes. It provides - interactive documentation and guides for both on-chain and off-chain - integration. -full: false -index: false +title: API Reference +description: Comprehensive interactive guide to on-chain and off-chain APIs for developers +icon: Code --- # API Reference @@ -17,9 +13,8 @@ The API reference is interactive, so developers can try out the APIs from the we The following on-chain contracts are documented in the API reference: - [EVM](api-reference/evm) -- [Aptos](api-reference/aptos) -- [CosmWasm](api-reference/cosmwasm) Hermes also has interactive API documentation hosted by the service itself: - [Hermes](https://hermes.pyth.network/docs/) +- [Benchmarks / Historical Prices](https://benchmarks.pyth.network/docs) diff --git a/apps/developer-hub/content/docs/price-feeds/api-reference/_meta.json b/apps/developer-hub/content/docs/price-feeds/api-reference/_meta.json new file mode 100644 index 0000000000..d9c6b3661f --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/api-reference/_meta.json @@ -0,0 +1,12 @@ +{ + "evm": { + "title": "EVM ↗", + "href": "https://api-reference.pyth.network/price-feeds/evm/getPriceNoOlderThan", + "newWindow": true + }, + "hermes": { + "title": "Hermes ↗", + "href": "https://hermes.pyth.network/docs/", + "newWindow": true + } +} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/best-practices.mdx b/apps/developer-hub/content/docs/price-feeds/best-practices.mdx similarity index 98% rename from apps/developer-hub/content/docs/price-feeds/v1/best-practices.mdx rename to apps/developer-hub/content/docs/price-feeds/best-practices.mdx index 1544482ef5..25fb58136d 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/best-practices.mdx +++ b/apps/developer-hub/content/docs/price-feeds/best-practices.mdx @@ -1,11 +1,7 @@ --- -title: "Pyth Price Feeds: Best Practices for Safe Use" -description: >- - Best practices for Pyth price feeds: secure fixed-point representation, - mitigate latency & threats, use confidence intervals, and follow futures - pricing guidelines. -full: false -index: false +title: Best Practices +description: Technical guidance for safe and effective use of Pyth price feeds in your application +icon: ShieldCheck --- # Best Practices diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses.mdx similarity index 74% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses.mdx index f4ac318ac1..9f4d55c2fa 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses.mdx @@ -1,10 +1,7 @@ --- -title: Pyth Contract Addresses for Multiple Blockchains -description: >- - Discover Pyth Price Feed contract addresses for EVM, Solana, Aptos, and more. - Visit our Developer Hub for quick access to your blockchain’s address. -full: false -index: false +title: Contract Addresses +description: Deployed Pyth Price Feed contract addresses across all supported blockchains +icon: AddressBook --- # Contract Addresses diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/_meta.json b/apps/developer-hub/content/docs/price-feeds/contract-addresses/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/_meta.json rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/aptos.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/aptos.mdx similarity index 84% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/aptos.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/aptos.mdx index 2fb61d5834..9f7c23ce2d 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/aptos.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/aptos.mdx @@ -1,12 +1,11 @@ --- -title: "Aptos Pyth Contract Addresses (Mainnet, Testnet, Devnet)" -description: >- - Browse Pyth’s Aptos contract addresses on Mainnet, Testnet, and Devnet with - direct links to Pyth, Wormhole, and the Deployer for quick reference. -full: false -index: false +title: "Aptos Contract Addresses" +description: "Pyth Network price feed contract addresses and named addresses for Aptos blockchain including mainnet, testnet, and Movement networks." +icon: "hexagon" --- +import CopyAddress from "../../../components/CopyAddress"; + # Price Feed Contract Addresses on Aptos Pyth is currently deployed on Aptos Mainnet, Aptos Testnet, and Movement devnet. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/cosmwasm.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/cosmwasm.mdx similarity index 89% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/cosmwasm.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/cosmwasm.mdx index 05c7c2548b..01edcd6629 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/cosmwasm.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/cosmwasm.mdx @@ -1,10 +1,7 @@ --- -title: Price Feed Contract Addresses on CosmWasm Networks -description: >- - Find Pyth contract addresses on CosmWasm networks—mainnets and testnets across - multiple chains. Access your network’s address instantly. -full: false -index: false +title: "CosmWasm Contract Addresses" +description: "Pyth Network price feed contract addresses for CosmWasm-based blockchain networks including Injective, Osmosis, Neutron, and more." +icon: "atom" --- # Price Feed Contract Addresses on CosmWasm Networks diff --git a/apps/developer-hub/content/docs/price-feeds/contract-addresses/evm.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/evm.mdx new file mode 100644 index 0000000000..f27e780d73 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/evm.mdx @@ -0,0 +1,204 @@ +--- +title: "EVM Contract Addresses" +description: "Pyth Network price feed contract addresses for all supported EVM-compatible blockchain networks including Ethereum, Arbitrum, Polygon, and more." +icon: "link" +--- + +import CopyAddress from "../../../components/CopyAddress"; + +# Price Feed Contract Addresses on EVM Networks + +Pyth is currently available on the EVM networks below using Pyth Stable price sources that are accessible via Hermes Stable. + +## Mainnets + +| Network | Contract address | +| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0G | | +| Abstract | | +| Apechain | | +| Arbitrum | | +| Aurora | | +| Avalanche | | +| Berachain | | +| Bittensor | | +| Blast | | +| BNB | | +| BTTC | | +| Base | | +| Boba | | +| Camp Network | | +| Canto | | +| Celo | | +| Chiliz | | +| Conflux eSpace | | +| Core DAO | | +| Cronos | | +| Cronos zkEVM | | +| EOS | | +| EVMOS | | +| Ethereum | | +| Etherlink | | +| Eventum | | +| Fantom | | +| Filecoin | | +| Flow | | +| Gnosis | | +| Gravity | | +| Hedera | | +| Hemi | | +| Horizen EON | | +| HyperEVM | | +| Injective EVM | | +| Injective inEVM | | +| Ink | | +| Iota | | +| Kava | | +| KCC | | +| Kaia | | +| LightLink Phoenix | | +| Linea | | +| Manta | | +| Mantle | | +| Merlin | | +| Meter | | +| Mezo | | +| Mode | | +| Morph | | +| Neon | | +| OpBNB | | +| Optimism | | +| Plasma | | +| Polygon | | +| Polygon zkEVM | | +| Polynomial | | +| Ronin | | +| Scroll | | +| Superseed | | +| Sei EVM | | +| Shimmer | | +| Skate | | +| Sonic | | +| Soneium | | +| Story Protocol | | +| Swellchain | | +| Taiko | | +| Unichain | | +| Viction | | +| WEMIX | | +| Worldchain | | +| ZKFair | | +| zkSync Era | | +| zetachain | | + +## Testnets + +| Network | Contract address | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Abstract testnet | | +| ApeChain (testnet) | | +| Arbitrum Blueberry (testnet) | | +| Arbitrum Sepolia (testnet) | | +| Aurora testnet | | +| BNB testnet | | +| BTTC testnet | | +| Base Sepolia (testnet) | | +| Berachain Bepolia testnet | | +| Bittensor testnet | | +| Blast Sepolia | | +| Ble testnet | | +| Boba Goerli (testnet) | | +| Boba Sepolia (testnet) | | +| Canto testnet | | +| Celo Alfajores (testnet) | | +| Chiado (Gnosis testnet) | | +| Chiliz testnet | | +| Conflux eSpace testnet | | +| Core DAO testnet | | +| Converge testnet | | +| Cronos testnet | | +| Cronos zkEVM Testnet | | +| Dela Deperp Testnet | | +| Dela Deperp Mithreum Testnet | | +| EOS testnet | | +| Etherlink testnet | | +| Eventum testnet | | +| EVMOS testnet | | +| Fantom testnet | | +| Filecoin calibration | | +| Flow Testnet | | +| Fluent testnet | | +| Fuji (Avalanche testnet) | | +| Giwa Testnet | | +| Hedera testnet | | +| Hemi testnet | | +| HyperEVM testnet | | +| Injective inEVM testnet | | +| Kakarot Sepolia testnet | | +| Kava testnet | | +| KCC testnet | | +| Klaytn | | +| Injective EVM | | +| Ink Sepolia | | +| Kaia testnet | | +| LightLink Pegasus | | +| Linea Goerli | | +| Linea Sepolia | | +| Manta testnet | | +| Manta Sepolia | | +| Mantle sepolia | | +| MegaEth Testnet | | +| Merlin testnet | | +| Merlin testnet V2 | | +| Meter testnet | | +| Mezo testnet | | +| Mode testnet | | +| Monad testnet | | +| Monad testnet - beta oracle | | +| Morph Holesky testnet | | +| Morph testnet | | +| Mumbai (Polygon testnet) | | +| Neon devnet | | +| Olive Testnet | | +| OpBNB Testnet | | +| Optimism Goerli (testnet) | | +| Optimism Sepolia (testnet) | | +| Optimism Celestia Raspberry | | +| Orange Avalanche Subnet (testnet) | | +| Polygon Amoy testnet | | +| Polygon Blackberry testnet | | +| Polygon zkEVM testnet | | +| Polynomial testnet | | +| Reya testnet | | +| Saigon (Ronin testnet) | | +| Sei EVM testnet | | +| Scroll Sepolia | | +| Sepolia (Ethereum testnet) | | +| Shimmer testnet | | +| Skate testnet | | +| Soneium (testnet) | | +| Sonic Blaze Testnet | | +| Sonic New Testnet | | +| Story Testnet | | +| Superseed Testnet | | +| Swellchain Testnet | | +| Tabi Testnet | | +| Taiko Hekla | | +| Unichain Sepolia | | +| Viction testnet | | +| WEMIX testnet | | +| Worldchain testnet | | +| ZKFair testnet | | +| zetachain testnet | | +| zkSync Era Goerli (testnet) | | +| zkSync Era Sepolia (testnet) | | + +Pyth is available on the following network using Pyth Beta price sources: + +| Network | Contract address | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Horizen GOBI testnet | | + +## Price Feed IDs + +The price feed IDs for EVM chains are available [here](../price-feeds.mdx) diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/fuel.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/fuel.mdx similarity index 63% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/fuel.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/fuel.mdx index 69aec422cb..010e3067af 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/fuel.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/fuel.mdx @@ -1,12 +1,11 @@ --- -title: Pyth Fuel Contract Addresses | Mainnet & Testnet -description: >- - Instantly access Pyth Core Fuel Mainnet and Testnet price feed addresses with - direct links and one-click copy for seamless verification. -full: false -index: false +title: "Fuel Contract Addresses" +description: "Pyth Network price feed contract addresses for Fuel blockchain mainnet and testnet networks." +icon: "fire" --- +import CopyAddress from "../../../components/CopyAddress"; + # Price Feed Contract Addresses on Fuel Pyth is currently deployed on Fuel Mainnet and Fuel Testnet. @@ -14,4 +13,4 @@ Pyth is currently deployed on Fuel Mainnet and Fuel Testnet. | Network | Contract address | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Fuel Mainnet | | -| Fuel Testnet | | +| Fuel Testnet | | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/iota.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/iota.mdx similarity index 90% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/iota.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/iota.mdx index e417cc6029..c0e345316f 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/iota.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/iota.mdx @@ -1,10 +1,7 @@ --- -title: "IOTA Contract Addresses: Pyth & Wormhole Testnet/Mainnet" -description: >- - Provides Pyth and Wormhole contract addresses for IOTA testnet and mainnet, - with explorer links for each key ID to facilitate cross-chain integration. -full: false -index: false +title: "IOTA Contract Addresses" +description: "Pyth Network price feed contract addresses for IOTA mainnet and testnet networks, including Pyth State ID, Package ID, and Wormhole integration addresses." +icon: "dots-three-circle" --- # Price Feed Contract Addresses on IOTA diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/movement.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/movement.mdx similarity index 84% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/movement.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/movement.mdx index 7fb60aa404..4bfc2a92f1 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/movement.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/movement.mdx @@ -1,13 +1,11 @@ --- -title: Movement Network Contract Addresses for Pyth Mainnet -description: >- - Discover Pyth Movement’s key contract addresses—Pyth, Wormhole, and - Deployer—and access direct explorer links. Integrate and verify effortlessly - on mainnet. -full: false -index: false +title: "Movement Contract Addresses" +description: "Pyth Network price feed contract addresses for Movement blockchain mainnet, including Pyth, Wormhole, and deployer addresses." +icon: "arrows-clockwise" --- +import CopyAddress from "../../../components/CopyAddress"; + # Price Feed Contract Addresses on Movement Pyth is currently deployed on the following Movement networks. diff --git a/apps/developer-hub/content/docs/price-feeds/contract-addresses/near.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/near.mdx new file mode 100644 index 0000000000..a67fcf876f --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/near.mdx @@ -0,0 +1,12 @@ +--- +title: "NEAR Contract Addresses" +description: "Pyth Network price feed contract addresses for NEAR Protocol mainnet and testnet networks." +icon: "network" +--- + +# Price Feed Contract Addresses on NEAR + +| Network | Contract address | +| ------------ | --------------------- | +| NEAR Mainnet | `pyth-oracle.near` | +| NEAR Testnet | `pyth-oracle.testnet` | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/pythnet.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/pythnet.mdx similarity index 69% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/pythnet.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/pythnet.mdx index bad98d851e..e71343b09e 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/pythnet.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/pythnet.mdx @@ -1,26 +1,19 @@ --- -title: Pythnet & Testnet Contract Addresses for Cross-Chain Price Feeds -description: >- - Easily access Pythnet and testnet contract addresses for blockchain price - feeds. View mainnet/testnet details, reference links, and comprehensive - program information. -full: false -index: false +title: "Pythnet Program Addresses" +description: "Program addresses for Pythnet blockchain including Oracle Program, Remote Executor, and Message Buffer for both mainnet and testnet." +icon: "code" --- # Price Feed Program Addresses on Pythnet - -
- **Important:** The addresses on this page are for the Pythnet network - itself, which is used to construct and deliver Pyth prices to other - blockchains. If you are building an application on EVM, Solana, SVM, or - another chain, you should use the Pyth program deployed on your target chain - instead. Please refer to the [Contract - Addresses](/price-feeds/contract-addresses) page and select your specific - blockchain environment. -
-
+ + **Important:** The addresses on this page are for the Pythnet network itself, + which is used to construct and deliver Pyth prices to other blockchains. If + you are building an application on EVM, Solana, SVM, or another chain, you + should use the Pyth program deployed on your target chain instead. Please + refer to the [Contract Addresses](/price-feeds/contract-addresses) page and + select your specific blockchain environment. + The following table contains the addresses of the programs deployed on Pythnet that operate together to construct Pyth prices and deliver them to other blockchains: diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/solana.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/solana.mdx similarity index 89% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/solana.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/solana.mdx index fbe26ddc1c..bb393008ab 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/solana.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/solana.mdx @@ -1,12 +1,11 @@ --- -title: Solana Program Addresses & SVM Chains Overview -description: >- - Access Solana program addresses and SVM networks (mainnet, devnet, testnet, or - custom). Includes direct links and one-click copy for development workflows. -full: false -index: false +title: "Solana & SVM Contract Addresses" +description: "Pyth Network program addresses for Solana and other Solana Virtual Machine (SVM) compatible blockchains including Eclipse, Sonic, and more." +icon: "cpu" --- +import CopyAddress from "../../../components/CopyAddress"; + # Program Addresses on Solana and other SVM chains The Pyth Oracle consists of two different programs. @@ -25,6 +24,7 @@ The **Solana receiver program** is deployed at the following addresses: | Sonic Devnet | | | Atlas Testnet | | | Mantis Mainnet | | +| Fogo Testnet | | The **Price feed program** is deployed at the following addresses: @@ -40,3 +40,4 @@ The **Price feed program** is deployed at the following addresses: | Sonic Devnet | | | Atlas Testnet | | | Mantis Mainnet | | +| Fogo Testnet | | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/starknet.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/starknet.mdx similarity index 81% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/starknet.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/starknet.mdx index 3530be25d1..451f789828 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/starknet.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/starknet.mdx @@ -1,12 +1,11 @@ --- -title: "Pyth Price Feed Contract Addresses on Starknet: Mainnet and Testnet" -description: >- - Pyth StarkNet contract addresses for Mainnet and Testnet, with links to their - StarkScan pages. -full: false -index: false +title: "Starknet Contract Addresses" +description: "Pyth Network price feed contract addresses for Starknet blockchain including mainnet and testnet deployments." +icon: "star" --- +import CopyAddress from "../../../components/CopyAddress"; + # Price Feed Contract Addresses on Starknet Pyth is deployed on both Starknet Mainnet and Testnet. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/sui.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/sui.mdx similarity index 91% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/sui.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/sui.mdx index 5ee6fd2afc..9518fa9f41 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/sui.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/sui.mdx @@ -1,10 +1,7 @@ --- -title: Sui Contract Addresses on Sui Blockchain -description: >- - This page lists Pyth’s Sui contract addresses on mainnet and testnet, - including contract IDs and explorer URLs for integration and verification. -full: false -index: false +title: "Sui Contract Addresses" +description: "Pyth Network price feed contract addresses for Sui blockchain including mainnet and testnet package IDs and state IDs." +icon: "droplet" --- # Price Feed Contract Addresses on Sui diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/ton.mdx b/apps/developer-hub/content/docs/price-feeds/contract-addresses/ton.mdx similarity index 79% rename from apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/ton.mdx rename to apps/developer-hub/content/docs/price-feeds/contract-addresses/ton.mdx index 3856ce32cd..b6f2b1e67a 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/ton.mdx +++ b/apps/developer-hub/content/docs/price-feeds/contract-addresses/ton.mdx @@ -1,12 +1,11 @@ --- -title: TON Contract Addresses (Mainnet & Testnet) | Pyth -description: >- - Explore Pyth’s TON Mainnet & Testnet contract addresses. Verify them instantly - on TONScan. -full: false -index: false +title: "TON Contract Addresses" +description: "Pyth Network price feed contract addresses for TON (The Open Network) mainnet and testnet networks." +icon: "diamond" --- +import CopyAddress from "../../../components/CopyAddress"; + # Price Feed Contract Addresses on TON Pyth is currently deployed on TON Mainnet and TON Testnet. diff --git a/apps/developer-hub/content/docs/price-feeds/create-tradingview-charts.mdx b/apps/developer-hub/content/docs/price-feeds/create-tradingview-charts.mdx new file mode 100644 index 0000000000..8a3968f2de --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/create-tradingview-charts.mdx @@ -0,0 +1,155 @@ +--- +title: "How to Create TradingView Charts" +description: "Integrate TradingView charts with Pyth price data using widgets or the charting library for custom trading interfaces." +icon: "chart-bar" +--- + +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + +# How to Create TradingView Charts + +The TradingView integration allows users to view Pyth prices on their own website. All Pyth prices made available through the TradingView integration are originating from [Pythnet](/price-feeds/how-pyth-works/pythnet). + +## Choosing an Implementation Method for TradingView Integration + +There are primarily two methods to integrate TradingView with your website to display Pyth prices: + +### 1. Using the TradingView Widget + +- **Advantages**: + - **Simplicity**: This is a plug-and-play solution which allows for quick integration. You won't need to engage in complex setup processes or handle any backend configurations. +- **Disadvantages**: + - **Limited Customization**: The widget comes as-is, and while you can change basic parameters like the `symbol` or `theme`, more advanced customizations are restricted. + +### 2. Using the Datafeed URL with Charting Library + +- **Advantages**: + - **Deep Customization**: Suited for those who need a deeper level of integration and customization. By utilizing the UDF-compatible URL, you can tailor the look, feel, and functionality of the chart to better fit your application's needs. +- **Disadvantages**: + - **Added Complexity**: Integrating the Charting Library requires more technical know-how and potentially more time compared to the simpler widget integration. + +When deciding between the two, consider the user experience you want to provide, the technical expertise at hand, and the time you can allocate to the integration. For a rapid deployment with minimal adjustments, the TradingView Widget is the way to go. If you need more control and are prepared for a deeper dive into the implementation, the Datafeed URL with the Charting Library would be your best choice. + +## TradingView Widget + +1. Add the following script(s) from [TradingView](https://www.tradingview.com/widget/advanced-chart/) to your website depending on your framework: + + + + ```html copy + +
+
+ + +
+ + ``` +
+ + ```jsx copy + // TradingViewWidget.jsx + + import React, { useEffect, useRef } from "react"; + + let tvScriptLoadingPromise; + + export default function TradingViewWidget() { + const onLoadScriptRef = useRef(); + + useEffect(() => { + onLoadScriptRef.current = createWidget; + + if (!tvScriptLoadingPromise) { + tvScriptLoadingPromise = new Promise((resolve) => { + const script = document.createElement("script"); + script.id = "tradingview-widget-loading-script"; + script.src = "https://s3.tradingview.com/tv.js"; + script.type = "text/javascript"; + script.onload = resolve; + + document.head.appendChild(script); + }); + } + + tvScriptLoadingPromise.then( + () => onLoadScriptRef.current && onLoadScriptRef.current() + ); + + return () => (onLoadScriptRef.current = null); + + function createWidget() { + if (document.getElementById("tradingview") && "TradingView" in window) { + new window.TradingView.widget({ + autosize: true, + symbol: "PYTH:BTCUSD", + interval: "D", + timezone: "Etc/UTC", + theme: "light", + style: "1", + locale: "en", + toolbar_bg: "#f1f3f6", + enable_publishing: false, + allow_symbol_change: true, + container_id: "tradingview", + }); + } + } + + }, []); + + return ( + +
+
+
+ ); } + + ``` + + + + +2. Replace the `symbol` parameter with the Pyth symbol you want to display. For example, to display the price of Ethereum, use `symbol: "PYTH:ETHUSD"`. + +3. Replace the `interval` parameter with the time interval you want to display. For example, to display the price of Ethereum in 1-minute intervals, use `interval: "1"`. Possible resolutions are daily (D or 1D, 2D ... ), weekly (1W, 2W ...), monthly (1M, 2M...) and an intra-day resolution – minutes(1, 2 ...). + +4. Replace the `timezone` parameter with the timezone you want to display. For example, to display the price of Ethereum in the Eastern Time Zone, use `timezone: "America/New_York"`. + +5. Replace the `theme` parameter with the theme you want to display. For example, to display the price of Ethereum in dark mode, use `theme: "dark"`. + +6. There is a fully working open-source example of the TradingView integration by one of Pyth's contributors [here](https://github.com/cctdaniel/pyth-tv-example). The example application is deployed [here](https://pyth-tv-example.vercel.app/). + +Note: The TradingView plug-and-play widget does not allow for much customization. If you want to customize the widget, you can use the [TradingView Charting Library](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). Please see the next section for more details. + +## Using Datafeed URL with Charting Library + +We also provide a UDF-compatible URL that follows the [TradingView UDF spec](https://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF). You can implement your own datafeed utilizing the API or use the built-in UDF adapter with the API. If you need a step-by-step guide, refer to the [How to connect data via Datafeed API](https://www.tradingview.com/charting-library-docs/latest/tutorials/implement_datafeed_tutorial/) tutorial, or you can reference the example [here](https://github.com/cctdaniel/pyth-tv-charting-lib), the main files that may be of interest are: [datafeed.js](https://github.com/cctdaniel/pyth-tv-charting-lib/blob/main/src/utils/datafeed.js) and [streaming.js](https://github.com/cctdaniel/pyth-tv-charting-lib/blob/main/src/utils/streaming.js). + +The datafeed URL is [here](https://benchmarks.pyth.network/v1/shims/tradingview) and documentation can be found [here](https://benchmarks.pyth.network/redoc) + +### Example + +- Symbol Info: https://benchmarks.pyth.network/v1/shims/tradingview/symbol_info +- History: https://benchmarks.pyth.network/v1/shims/tradingview/history?symbol=Crypto.ETH/USD&resolution=1&from=1690338541&to=1690338741 +- Stream of prices: https://benchmarks.pyth.network/v1/shims/tradingview/streaming +- Config: https://benchmarks.pyth.network/v1/shims/tradingview/config +- Symbols: https://benchmarks.pyth.network/v1/shims/tradingview/symbols?symbol=Crypto.BTC/USD +- Search: https://benchmarks.pyth.network/v1/shims/tradingview/search?query=bitcoin diff --git a/apps/developer-hub/content/docs/price-feeds/v1/error-codes/_meta.json b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/error-codes/_meta.json rename to apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/_meta.json b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/_meta.json rename to apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/part-1.mdx b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/part-1.mdx similarity index 98% rename from apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/part-1.mdx rename to apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/part-1.mdx index 0d9dc803fc..a6a10aed56 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/part-1.mdx +++ b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/part-1.mdx @@ -1,11 +1,7 @@ --- -title: Create a Pyth-Integrated Contract to Fetch ETH Price on EVM -description: >- - Learn how to deploy a Pyth EVM smart contract that delivers real-time ETH/USD - rates and powers accurate NFT pricing. Follow our step-by-step guide with - built-in data-freshness verification. -full: false -index: false +title: "Create Your First Pyth App - Part 1" +description: "Learn to create a Solidity contract that reads ETH/USD prices from Pyth oracles and uses them to mint NFTs for $1 worth of ETH." +icon: "hammer" --- # Create your first Pyth app on EVM @@ -72,7 +68,7 @@ The Foundry project has been successfully initialized! At this point, delete the sample code from `src` and the test file from `test` -- we won't need them anymore. ```bash copy -rm -r src/* test/* +rm -r src/* test/* scripts/* ``` ### Install the Pyth SDK diff --git a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/part-2.mdx b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/part-2.mdx similarity index 96% rename from apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/part-2.mdx rename to apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/part-2.mdx index 2e1e6b6744..14708579ff 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/evm/part-2.mdx +++ b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/evm/part-2.mdx @@ -1,11 +1,7 @@ --- -title: "Part 2: Deploy & Interact with Pyth App on EVM Testnets" -description: >- - A step-by-step guide to deploying Pyth applications on the EVM, retrieving - real-time price feeds via Hermes, and integrating them into a TypeScript - project. -full: false -index: false +title: "Deploy Your Pyth App - Part 2" +description: "Deploy your Pyth price feed contract to OP Sepolia testnet and interact with it using command line tools and TypeScript." +icon: "rocket" --- # Deploy your Pyth App @@ -18,12 +14,10 @@ This part of the tutorial will conver the following: - Interact with the contract from the command line. - Update and fetch the price from the contract using [hermes-client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js). - -
- This tutorial is continuation of the [Part 1: Create a Contract](./part-1). - If you haven't completed that part yet, please do so before continuing. -
-
+ + This tutorial is continuation of the [Part 1: Create a Contract](./part-1). If + you haven't completed that part yet, please do so before continuing. + ## Deploy the contract @@ -62,7 +56,7 @@ You can verify that the ETH has arrived in your wallet by running the command `c The final step before deploying is to get the arguments for the contract's constructor: the [Pyth contract address](https://docs.pyth.network/price-feeds/contract-addresses/evm#testnets) for Optimism Sepolia -and the [price feed id](https://docs.pyth.network/price-feeds/price-feed-ids) for ETH/USD. +and the [price feed id](https://docs.pyth.network/price-feeds/price-feeds) for ETH/USD. We will also export these values as environment variables for convenience: ```bash copy @@ -77,6 +71,7 @@ Run the following command: forge create src/MyFirstPythContract.sol:MyFirstPythContract \ --private-key $PRIVATE_KEY \ --rpc-url $RPC_URL \ +--broadcast \ --constructor-args $PYTH_OP_SEPOLIA_ADDRESS $ETH_USD_ID ``` @@ -125,7 +120,7 @@ We can do this using `cast` by running the following command: cast send \ --private-key $PRIVATE_KEY \ --rpc-url $RPC_URL \ - -j \ + -j 1 \ --value 0.0005ether \ $DEPLOYMENT_ADDRESS \ "updateAndMint(bytes[])" \ @@ -253,7 +248,7 @@ async function run() { console.log(priceFeedUpdateData); const hash = await contract.write.updateAndMint( - [priceFeedUpdateData as any], + [[`0x${priceFeedUpdateData.binary.data[0]}`]] as any, { value: parseEther("0.0005") }, ); console.log("Transaction hash:"); diff --git a/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/index.mdx b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/index.mdx new file mode 100644 index 0000000000..f68543cff6 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/index.mdx @@ -0,0 +1,20 @@ +--- +title: Create Your First Pyth App +description: Complete tutorial for building smart contract applications using Pyth Price feeds +icon: Rocket +--- + +# Create your first Pyth app + +This tutorial walks through creating a complete application that uses Pyth Price feeds. +The application includes a smart contract and an off-chain code invoking the contract. + + + The tutorial is an in-depth walkthrough of contract development; more + experienced developers may want to refer to [Use Real-time Price + Data](./use-real-time-data) for a more concise version. + + +Please choose your environment to get started: + +- [EVM](create-your-first-pyth-app/evm/part-1) diff --git a/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/meta.json b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/meta.json new file mode 100644 index 0000000000..20e2a3029a --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/create-your-first-pyth-app/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Create Your First Pyth App", + "icon": "MyIcon", + "pages": ["index", "evm"], + "defaultOpen": true +} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/current-fees.mdx b/apps/developer-hub/content/docs/price-feeds/current-fees.mdx similarity index 56% rename from apps/developer-hub/content/docs/price-feeds/v1/current-fees.mdx rename to apps/developer-hub/content/docs/price-feeds/current-fees.mdx index 0c2e421801..a29dcda1e4 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/current-fees.mdx +++ b/apps/developer-hub/content/docs/price-feeds/current-fees.mdx @@ -1,10 +1,7 @@ --- -title: Current Pyth Network Price Feed Update Fees by Blockchain -description: >- - Compare Pyth Network's current fees for updating price feeds on Ethereum, - Avalanche, and 10+ blockchains. Optimize transactions with the best rates. -full: false -index: false +title: Current Fees +description: Fee structure for price feed updates across different blockchain networks +icon: CurrencyDollar --- # Current Fees @@ -12,13 +9,11 @@ index: false The following tables shows the total fees payable when updating a price feed. Please note the fees shown below is the amount paid in `msg.value` per price feed update. - -
- **Note**: The default fee of all chains **not** mentioned below is - **1(one)** unit of the smallest denomination of the blockchain's native - token (e.g., **1 wei on Ethereum**). -
-
+ + **Note**: The default fee of all chains **not** mentioned below is **1(one)** + unit of the smallest denomination of the blockchain's native token (e.g., **1 + wei on Ethereum**). + | **Network** | **Fees** | | ----------- | ---------------- | diff --git a/apps/developer-hub/content/docs/price-feeds/derive-cross-rate.mdx b/apps/developer-hub/content/docs/price-feeds/derive-cross-rate.mdx new file mode 100644 index 0000000000..0fb19cdc56 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/derive-cross-rate.mdx @@ -0,0 +1,126 @@ +--- +title: "Derive Cross Rate" +description: "Learn how to combine two price feeds to create synthetic cross rates for trading pairs not directly supported by Pyth." +icon: "arrows-cross" +--- + +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + +# Derive Cross Rate + +This guide shows how to combine two price feeds to derive a cross rate. These are also known as "synthetic" price feeds. +Cross rates or Synthetic Price feeds are useful for trading pairs that are not directly supported by Pyth. + + + +### EVM + +For example, if you want to trade the price of **`ETH/EUR{:jsx}`**, which is not directly supported by Pyth, you can combine the price of **`ETH/USD{:jsx}`** and **`EUR/USD{:jsx}`** to derive the price of **`ETH/EUR{:jsx}`**. + +$$ +\large{\text{ETH/EUR} = \text{ETH/USD} \div \text{EUR/USD}} +$$ + +### Derive a cross rate + +The Pyth Solidity SDK provides [`deriveCrossRate`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/PythUtils.sol#L77) function to combine two price feeds. +This method is available in [Pyth solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/solidity). + +This method takes the following parameters: + +- `price1`: The first price feed value, representing a / b (e.g., ETH/USD). Must be a signed integer (int64). +- `expo1`: The exponent for price1, indicating the number of decimal places. +- `price2`: The second price feed value, representing c / b (e.g., EUR/USD). +- `expo2`: The exponent for price2. +- `targetExponent`: The desired exponent for the output cross rate (a / c). The result will be scaled to this exponent. + +Returns: + +- `crossRate`: The computed cross rate (a / c), scaled to targetExponent. + +### Example + +```solidity copy +pragma solidity ^0.8.0; + +import "@pythnetwork/pyth-sdk-solidity/IPyth.sol"; +import "@pythnetwork/pyth-sdk-solidity/PythStructs.sol"; +import "@pythnetwork/pyth-sdk-solidity/PythUtils.sol"; + +contract ExampleCrossRate { + IPyth public pyth; + + constructor(address _pythContract) { + pyth = IPyth(_pythContract); + } + + // priceUpdate should include both price feeds + function getEthPerEur( + bytes32 ethUsdId, + bytes32 eurUsdId, + bytes[] calldata priceUpdate + ) external payable returns (int64 price, int32 expo) { + // Update both feeds + uint fee = pyth.getUpdateFee(priceUpdate); + pyth.updatePriceFeeds{ value: fee }(priceUpdate); + + // Fetch prices + PythStructs.Price memory ethUsd = pyth.getPriceNoOlderThan(ethUsdId, 60); + PythStructs.Price memory eurUsd = pyth.getPriceNoOlderThan(eurUsdId, 60); + + // Derive ETH/EUR = ETH/USD / EUR/USD + int32 targetExpo = -8; + int64 ethPerEur = PythUtils.deriveCrossRate( + ethUsd.price, + ethUsd.expo, + eurUsd.price, + eurUsd.expo, + targetExpo + ); + + return (ethPerEur, targetExpo); + } +} + +``` + +#### ⚠️ Things to Keep in Mind + +- The function reverts if either price is **negative**, or if any exponent is **less than -255**. +- The result is rounded down. If the result is smaller than 1 in the given `targetExponent{:jsx}`, it will return 0. +- Confidence intervals are not derived in this function. If needed, you have to derive them manually. +- Reverts with `PythErrors.ExponentOverflow{:jsx}` if `targetExponent + expo1 - expo2{:jsx}` is outside the range **[-58, 58]**. + +### Additional Resources + +You may find these additional resources helpful. + +#### How to use real-time data in EVM contracts + +The [How to use real-time data in EVM contracts](./use-real-time-data/evm) guide provides a step-by-step guide on how to use real-time data in EVM contracts. + +#### Price Feed IDs + +The [Price Feed IDs](./price-feeds.mdx) page lists the price feed IDs for each asset supported by Pyth. + + + + +### SVM + +The Pyth Rust SDK provides [`get_price_in_quote`](https://github.com/pyth-network/pyth-sdk-rs/blob/d6598dcf8b556cd97bb597661cdc012398371be1/pyth-sdk/src/price.rs#L90) function to combine two price feeds. +This method is available in [Pyth Rust SDK](https://github.com/pyth-network/pyth-sdk-rs/tree/main/pyth-sdk). + +### Example + +```rust copy +let btc_usd: Price = ...; +let eth_usd: Price = ...; +// -8 is the desired exponent for the result +let btc_eth: Price = btc_usd.get_price_in_quote(ð_usd, -8); +println!("BTC/ETH price: ({} +- {}) x 10^{}", price.price, price.conf, price.expo); +``` + + + + diff --git a/apps/developer-hub/content/docs/price-feeds/error-codes.mdx b/apps/developer-hub/content/docs/price-feeds/error-codes.mdx new file mode 100644 index 0000000000..b818bdee0b --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/error-codes.mdx @@ -0,0 +1,9 @@ +--- +title: Error Codes +description: Common error codes and troubleshooting for Pyth Price Feeds integration +icon: Warning +--- + +# Error Codes + +- [EVM](error-codes/evm) diff --git a/apps/developer-hub/content/docs/price-feeds/error-codes/_meta.json b/apps/developer-hub/content/docs/price-feeds/error-codes/_meta.json new file mode 100644 index 0000000000..46bb37a222 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/error-codes/_meta.json @@ -0,0 +1,3 @@ +{ + "evm": "EVM" +} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/error-codes/evm.mdx b/apps/developer-hub/content/docs/price-feeds/error-codes/evm.mdx similarity index 91% rename from apps/developer-hub/content/docs/price-feeds/v1/error-codes/evm.mdx rename to apps/developer-hub/content/docs/price-feeds/error-codes/evm.mdx index 2d5136937d..26b908e7c9 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/error-codes/evm.mdx +++ b/apps/developer-hub/content/docs/price-feeds/error-codes/evm.mdx @@ -1,10 +1,7 @@ --- -title: "EVM Error Codes: Troubleshooting & Descriptions" -description: >- - Decode Pyth Network EVM errors to troubleshoot invalid arguments, missing - price feeds, governance issues, and more. Resolve issues quickly. -full: false -index: false +title: "EVM Error Codes" +description: "Reference table of error codes used in Pyth Network's EVM contracts with descriptions for debugging and troubleshooting." +icon: "warning-circle" --- # EVM Error Codes diff --git a/apps/developer-hub/content/docs/price-feeds/v1/fetch-price-updates.mdx b/apps/developer-hub/content/docs/price-feeds/fetch-price-updates.mdx similarity index 95% rename from apps/developer-hub/content/docs/price-feeds/v1/fetch-price-updates.mdx rename to apps/developer-hub/content/docs/price-feeds/fetch-price-updates.mdx index a71e14e94b..3bc0f8f358 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/fetch-price-updates.mdx +++ b/apps/developer-hub/content/docs/price-feeds/fetch-price-updates.mdx @@ -1,10 +1,7 @@ --- -title: Fetch Real-Time Price Data via Pyth Hermes API -description: >- - Fetch real-time on-chain price updates with Pyth Hermes API via REST, - streaming, or SDK. Use Pyth Price Feeds for fast, accurate data delivery. -full: false -index: false +title: How To Fetch Price Updates +description: Complete guide to fetching price updates via REST API, streaming, and SDK from Hermes +icon: ArrowsClockwise --- # How To Fetch Price Updates @@ -20,14 +17,12 @@ provides three different ways to fetch price updates: 1. [Streaming](#streaming) 1. [SDK](#sdk) - -
- Fetching a price from Hermes requires a price feed ID. This ID serves as a - unique identifier for each price feed (e.g., BTC/USD). The complete list of - Pyth price feed IDs is available at - https://pyth.network/developers/price-feed-ids -
-
+ + Fetching a price from Hermes requires a price feed ID. This ID serves as a + unique identifier for each price feed (e.g., BTC/USD). The complete list of + Pyth price feed IDs is available at + https://docs.pyth.network/price-feeds/price-feeds + ## REST API @@ -128,7 +123,7 @@ The [`HermesClient`](https://github.com/pyth-network/pyth-crosschain/blob/main/a const connection = new HermesClient("https://hermes.pyth.network", {}); const priceIds = [ - // You can find the ids of prices at https://pyth.network/developers/price-feed-ids + // You can find the ids of prices at https://docs.pyth.network/price-feeds/price-feeds "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", // BTC/USD price id "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", // ETH/USD price id ]; diff --git a/apps/developer-hub/content/docs/price-feeds/v1/getting-started.mdx b/apps/developer-hub/content/docs/price-feeds/getting-started.mdx similarity index 82% rename from apps/developer-hub/content/docs/price-feeds/v1/getting-started.mdx rename to apps/developer-hub/content/docs/price-feeds/getting-started.mdx index faaa6f2a80..144bb31b2b 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/getting-started.mdx +++ b/apps/developer-hub/content/docs/price-feeds/getting-started.mdx @@ -1,11 +1,7 @@ --- -title: "Getting Started with Pyth Price Feeds: Developer Guide & Resources" -description: >- - Pyth offers tutorials, API documentation, and best practice guides for - integrating its price feeds. These resources help you build, test, and deploy - reliable on-chain crypto data. -full: false -index: false +title: Getting Started +description: Quick and easy integration guide for Pyth price feeds - no sign up or API key required +icon: RocketLaunch --- # Getting Started @@ -22,11 +18,12 @@ Developers interested in using Pyth 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. +- [Use Historic Price Data](./use-historic-price-data/) is a how-to guide that provides the minimal steps to integrate historic price data into your app. - [API Reference](./api-reference) is an interactive playground that provides a detailed overview of the Pyth smart contract's functionality. This guide is useful for developers who want to understand the full capabilities of the Pyth oracles. In addition to the resources above, the following reference materials will be useful for developers as they integrate: -- [Price Feed IDs](https://www.pyth.network/developers/price-feed-ids) lists the price feed IDs for all the assets supported by Pyth. +- [Price Feed IDs](./price-feeds.mdx) lists the price feed IDs for all the assets supported by Pyth. - [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. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works.mdx similarity index 80% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works.mdx index 8b51b975f4..ec56b33a30 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works.mdx @@ -1,12 +1,7 @@ --- -title: "How Pyth Works: On-Chain Price Aggregation & Cross-Chain Data Transfer" -description: >- - Pyth Oracle provides real-time price data via cross-chain feeds. Publishers - submit signed price updates which are aggregated on-chain to ensure accuracy. - Developers can integrate these feeds directly into smart contracts for - blockchain applications. -full: false -index: false +title: How Pyth Works +description: Understanding Pyth protocol architecture - publishers, oracle program, and consumers +icon: Gear --- # Design Overview diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/_meta.json b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/_meta.json rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/cross-chain.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/cross-chain.mdx similarity index 86% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/cross-chain.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/cross-chain.mdx index 0cccfa7ec4..cc7f988da5 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/cross-chain.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/cross-chain.mdx @@ -1,11 +1,7 @@ --- -title: Pyth Network Cross-Chain Price Transfer Mechanisms -description: >- - Securely transfer and verify real-time price feeds across blockchains with - Pyth’s cross-chain solutions, including Wormhole, Hermes, and native on-chain - protocols. -full: false -index: false +title: "Cross-chain" +description: "Discover how Pyth transfers price data from Pythnet to target blockchains using Wormhole and Hermes." +icon: "Bridge" --- # Cross-chain @@ -13,7 +9,7 @@ index: false 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: -![](./assets/Pull-Architecture-Hermes.png) +![](../../../images/Pull-Architecture-Hermes.png) Data providers publish their prices on Pythnet. The on-chain [oracle program](oracle-program.md) then aggregates prices for a feed to obtain the aggregate price and confidence. Next, the Pythnet validators send a Wormhole message on each diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/ema-price-aggregation.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/ema-price-aggregation.mdx similarity index 88% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/ema-price-aggregation.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/ema-price-aggregation.mdx index 9f6e91f8f1..5a75b7e809 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/ema-price-aggregation.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/ema-price-aggregation.mdx @@ -1,11 +1,7 @@ --- -title: "EMA Price Aggregation in Pyth Network: How It Works & Confidence Metrics" -description: >- - Ensure real-time price accuracy with Pyth’s EMA Price Aggregation, blending - slot-weighted and inverse confidence-weighted exponential moving averages for - reliable data. -full: false -index: false +title: "EMA Price Aggregation" +description: "Understand Pyth's exponentially-weighted moving average prices that provide time-weighted historical price data." +icon: "TrendUp" --- # EMA Price Aggregation @@ -33,7 +29,7 @@ price_account .. CqFJLrT4rSpA46RQkVYWn8tdBDuQ7p7RXcp6Um76oaph In an EMA the most recent samples receive the most weight, and samples further back in time get exponentially less weight the farther in the past they are. For a 1 hour EMA, the samples 1 hour in the past get 50% of the weighting, samples 2 hours in the past get 25% of the weighting, 3 hours in the past get 12.5% of the weighting, etc. -![](./assets/EMA_Price_Aggregation_1.png) +![](../../../images/EMA_Price_Aggregation_1.png) While conceptually not as simple as an SMA (Simple Moving Average), the EMA has a particularly simple implementation for streaming applications such as Pyth. The exponential weighting method allows the entire history of prices and weights to be represented by a single number. @@ -48,6 +44,6 @@ The current Pyth averaging method is a slot-weighted, inverse confidence-weighte - **Slot weighted** — The Pyth EMA uses the Pythnet slot number to measure the passage of time. The averaging period is 5921 slots, which corresponds to approximately 1 hour on Pythnet. - **Inverse confidence weighted** — Weighting each sample by 1/Confidence lets the EMA give more weight to samples with tight confidence and ignore samples with very wide confidence. Below is an example of an outlier aggregate price with a wide confidence interval. Notice how the average using inverse confidence weighting does not get pulled up by the outlier sample while the uniform weighted average does. -![](./assets/EMA_Price_Aggregation_2.png) +![](../../../images/EMA_Price_Aggregation_2.png) For more details and explanations, be sure to read the dedicated blog post on this topic [here](https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1). diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/fees.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/fees.mdx similarity index 84% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/fees.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/fees.mdx index 9c38db6586..5931d0432e 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/fees.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/fees.mdx @@ -1,10 +1,7 @@ --- -title: Understanding Fees in the Pyth Network Protocol -description: >- - Learn how Pyth Network’s governance sets optional data fees for on-chain price - feeds, compensates providers, and ensures transparent, efficient pricing. -full: false -index: false +title: "Fees" +description: "Learn about Pyth Network's fee structure for price updates and how costs are distributed between users and data providers." +icon: "CurrencyDollar" --- # Fees diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/hermes.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/hermes.mdx similarity index 88% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/hermes.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/hermes.mdx index d72601e38b..35899fa983 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/hermes.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/hermes.mdx @@ -1,10 +1,7 @@ --- -title: "Hermes: Real-Time Price Data Service for Pyth Network" -description: >- - Provides real-time Pythnet and Wormhole price data via REST APIs and - server-sent events (SSE) for on-chain verification. -full: false -index: false +title: "Hermes" +description: "Explore Hermes, the web service that provides convenient REST API and streaming access to Pyth price updates." +icon: "Broadcast" --- # Hermes diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/oracle-program.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/oracle-program.mdx similarity index 84% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/oracle-program.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/oracle-program.mdx index 7d38a03367..320fb10f51 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/oracle-program.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/oracle-program.mdx @@ -1,11 +1,7 @@ --- -title: "Oracle Program: How Pyth Maintains & Aggregates Price Feeds" -description: >- - Discover how Pyth’s oracle delivers accurate on-chain price feeds by - aggregating real-time data and computing moving averages for your - decentralized apps. -full: false -index: false +title: "Oracle Program" +description: "Understand the core oracle program that manages price feeds, stores data provider contributions, and computes aggregate prices." +icon: "Code" --- # Oracle Program diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/price-aggregation.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/price-aggregation.mdx similarity index 90% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/price-aggregation.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/price-aggregation.mdx index b4b6d4e7a4..40961905ff 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/price-aggregation.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/price-aggregation.mdx @@ -1,10 +1,7 @@ --- -title: "Pyth Price Aggregation: Combining Data for Accurate Prices" -description: >- - Pyth delivers real-time market prices for DeFi and trading applications by - aggregating weighted data from multiple sources. -full: false -index: false +title: "Price Aggregation" +description: "Learn how Pyth combines individual data provider prices into robust aggregate prices using confidence-weighted algorithms." +icon: "MathOperations" --- # Price Aggregation @@ -15,11 +12,11 @@ Price aggregation combines the prices and confidences submitted by individual da The aggregation algorithm is designed to achieve 3 properties. First, it must be **robust to manipulation.** If most publishers are submitting a price of \$100 and one publisher submits a price of \$80, the aggregate price should remain near \$100 and not be overly influenced by the single outlying price. In the figure below, the aggregate price and confidence interval (represented by the blue star) is not influenced by the magenta publisher whose price is far away from the other publishers: -![](./assets/Price_Aggregation_1.png) +![](../../../images/Price_Aggregation_1.png) Second, the **aggregate price should appropriately weight data sources with different levels of accuracy.** Pyth allows publishers to submit a confidence interval because they have varying levels of accuracy in observing the price of a product. This property can result in situations where one publisher reports a price of \$101 +/- 1, and another reports \$110 +/- 10. In these cases, aggregating the price to be closer to \$101 than \$110 is appropriate, as in the figure below. -![](./assets/Price_Aggregation_2.png) +![](../../../images/Price_Aggregation_2.png) Finally, the **aggregate confidence interval should reflect the variation between publishers' prices.** Under normal market conditions, it is reasonable to expect a product to trade at a similar price across exchanges. @@ -27,7 +24,7 @@ In these cases, aggregate confidence interval is preferable to reflect the confi However, in some rare situations, a product can trade at different prices on different exchanges. In these cases, the aggregate confidence interval should widen out to reflect the variation between these prices, as shown in the figure on the right. -![](./assets/Price_Aggregation_3.png) +![](../../../images/Price_Aggregation_3.png) **Algorithm** @@ -50,21 +47,21 @@ Finally, the bold red star depicts the aggregate price and the bold red line dep In the first scenario, one publisher with a tight confidence interval is an outlier. Although this publisher does influence the objective function (the red line is lower on the left side than the right), it does not have enough influence to affect either the aggregate price or confidence interval. -![](./assets/Price_Aggregation_4.png) +![](../../../images/Price_Aggregation_4.png) The second scenario depicts how publishers with tighter confidence intervals can exert more influence over the location of the aggregate price, as long as their prices are consistent with the confidence intervals of other publishers. -![](./assets/Price_Aggregation_5.png) +![](../../../images/Price_Aggregation_5.png) The third scenario demonstrates the typical case where there are many publishers whose prices and confidence intervals roughly agree. In this case, the desired behavior is for the aggregate price and confidence to reflect those of the individual publishers. -![](./assets/Price_Aggregation_6.png) +![](../../../images/Price_Aggregation_6.png) Finally, the fourth scenario considers the case where the publishers publish distinct prices with non-overlapping confidence intervals. In this case, the confidence interval widens out because the dispersion between publishers creates a large gap between the aggregate price and the 25th/75th percentiles of the votes. -![](./assets/Price_Aggregation_7.png) +![](../../../images/Price_Aggregation_7.png) **Further Reading** diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/pythnet.mdx b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/pythnet.mdx similarity index 82% rename from apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/pythnet.mdx rename to apps/developer-hub/content/docs/price-feeds/how-pyth-works/pythnet.mdx index ce02f18753..dace6301cc 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/pythnet.mdx +++ b/apps/developer-hub/content/docs/price-feeds/how-pyth-works/pythnet.mdx @@ -1,10 +1,7 @@ --- -title: "Pythnet: Real-Time Off-Chain Price Feeds on Solana" -description: >- - Pythnet on Solana delivers secure, real-time price data across multiple - blockchains with on-chain verification for smart contracts. -full: false -index: false +title: "Pythnet" +description: "Learn about Pythnet, the dedicated blockchain that securely aggregates data provider prices for Pyth's oracle network." +icon: "Network" --- # Pythnet @@ -14,7 +11,7 @@ This blockchain is a computation substrate to securely combine the data provider Pythnet forms the core of Pyth's off-chain price feeds that serve all blockchains. Pythnet is powered by Solana technology: it runs the same validator software but is a Pyth-specific chain that is independent of Solana's mainnet. -The Pyth Data Association DAO enables each data provider to operate one validator by delegating them the necessary stake. +The Pythian Council enables each data provider to operate one validator by delegating them the necessary stake. The purpose of Pythnet is to provide a secure and reliable computing substrate for Pyth's price aggregation. Recall that Pyth's data providers submit their own price measurements for each product. diff --git a/apps/developer-hub/content/docs/price-feeds/index.mdx b/apps/developer-hub/content/docs/price-feeds/index.mdx new file mode 100644 index 0000000000..ffbd9b964c --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/index.mdx @@ -0,0 +1,8 @@ +--- +title: Price Feeds +description: Real-time, first-party, market data for a wide range of assets +icon: PriceTag +full: true +--- + +# Replace this with Custom Landing Page diff --git a/apps/developer-hub/content/docs/price-feeds/v1/market-hours.mdx b/apps/developer-hub/content/docs/price-feeds/market-hours.mdx similarity index 75% rename from apps/developer-hub/content/docs/price-feeds/v1/market-hours.mdx rename to apps/developer-hub/content/docs/price-feeds/market-hours.mdx index 4dc7bde8fb..55d7e21e57 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/market-hours.mdx +++ b/apps/developer-hub/content/docs/price-feeds/market-hours.mdx @@ -1,11 +1,7 @@ --- -title: "Pyth Market Hours by Asset Class: Trading Schedules & Holidays" -description: >- - Pyth provides market hours data for cryptocurrencies, stocks, forex, metals, - interest rates, and commodities. It includes regular schedules, holiday - closures, and exceptions. -full: false -index: false +title: Market Hours +description: Trading hours and availability schedule for different asset classes in Pyth Price Feeds +icon: Clock --- # Market Hours @@ -17,6 +13,10 @@ Pyth price feeds follow the [traditional market hours](https://www.cmegroup.com/ | US Equities | Every weekday from 9.30AM ET to 4PM ET | Markets are closed on weekends, and follow [NYSE Holidays & Trading Hours](https://www.nyse.com/markets/hours-calendars) | | EU Equities | Paris, Amsterdam, Ireland: Every weekday from 9AM CET to 5.30PM CET | Markets are closed on weekends, and follow [Euronext Holidays & Trading Hours](https://live.euronext.com/en/resources/trading-hours-holidays) | | UK Equities | Every weekday from 8AM UK time to 4.30PM UK time | Markets are closed on weekends, and follow [LSE Holidays & Trading Hours](https://www.londonstockexchange.com/equities-trading/business-days) | +| DE Equities | Every weekday from 9AM to 5.30PM CET | Markets are closed on weekends, and follow [Xetra Holidays & Trading Hours](https://www.xetra.com/xetra-en/trading/trading-calendar-and-trading-hours) | +| HK Equities | Every weekday from 9.30AM to 12PM & 1PM to 4PM HKT | Markets are closed on weekends, and follow [HKEX Holidays & Trading Hours](https://www.hkex.com.hk/Services/Trading-hours-and-Severe-Weather-Arrangements/Trading-Hours/Securities-Market?sc_lang=en) | +| CN Equities | Every weekday from 9.30AM to 11.30AM & 1PM to 2:57PM CST | Markets are closed on weekends, and follow [SSE Holidays & Trading Hours](https://english.sse.com.cn/start/trading/schedule/) | +| JP Equities | Every weekday from 9AM to 11.30AM & 12.30PM to 3:30PM JST | Markets are closed on weekends, and follow [JPX Holidays & Trading Hours](https://www.jpx.co.jp/english/corporate/about-jpx/calendar/) | | FX | From Sunday 5PM ET to Friday 5PM ET | Trading continues during most US holidays | | Emerging Markets FX | From Sunday 6PM ET to Friday 5PM ET. For USDBRL, USDCOP, USDCLP and USDPEN, please refer to the [EM FX Market Hours Guide](https://pyth-network.notion.site/EM-FX-Market-Hours-Guide-1de2eecaaac980eea5eddf8f34398309) | Spot EM FX liquidity can be significantly limited at the start of the trading week, outside local market trading hours, and during local holidays, which can lead to wider confidence intervals. Pyth EM FX currencies: INR, IDR, PHP, KRW, TWD, CNH, TRY, ZAR, MXN, BRL, COP, CLP, PEN | | Metals | From Sunday 6PM ET to Friday 5PM ET | Daily maintenance window applies from 5PM ET to 6PM ET, Monday to Thursday. Spot gold and silver trading also follow [CME holiday closures](https://www.cmegroup.com/tools-information/holiday-calendar.html)| diff --git a/apps/developer-hub/content/docs/price-feeds/v1/meta.json b/apps/developer-hub/content/docs/price-feeds/meta.json similarity index 58% rename from apps/developer-hub/content/docs/price-feeds/v1/meta.json rename to apps/developer-hub/content/docs/price-feeds/meta.json index 55fe56eaff..ff84bf329d 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/meta.json +++ b/apps/developer-hub/content/docs/price-feeds/meta.json @@ -1,17 +1,21 @@ { "root": true, "title": "Price Feeds", - "description": "Real-time data from financial institutions", - "icon": "ChartLine", + "description": "Real-time price data for DeFi applications", + "icon": "TrendingUp", "pages": [ + "---Introduction---", "index", "getting-started", "---Tutorials---", - "create-your-first-pyth-app", - "---Guides---", + "...create-your-first-pyth-app", + "---How-To Guides---", "use-real-time-data", + "use-historic-price-data", "fetch-price-updates", "schedule-price-updates", + "create-tradingview-charts", + "derive-cross-rate", "migrate-an-app-to-pyth", "use-pyth-for-morpho", "publish-data", @@ -20,14 +24,15 @@ "api-reference", "price-feeds", "current-fees", - "sponsored-feeds", + "push-feeds", "market-hours", "best-practices", "error-codes", "api-instances-and-providers", "contract-addresses", "pythnet-reference", - "---Understand Pyth---", + "[Example Applications](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds)", + "---Understanding Pyth---", "pull-updates", "how-pyth-works" ] diff --git a/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth.mdx b/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth.mdx new file mode 100644 index 0000000000..49d4013a19 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth.mdx @@ -0,0 +1,11 @@ +--- +title: "Migrate to Pyth from Another Oracle" +description: "Migration guides to help developers transition their applications from other oracle providers to Pyth price feeds." +icon: "arrows-counter-clockwise" +--- + +# Migrate to Pyth from Another Oracle + +The guides in this section are designed to help developers migrate an application from another oracle to use Pyth price feeds. + +- [Chainlink](migrate-an-app-to-pyth/chainlink.md) diff --git a/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth/_meta.json b/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth/_meta.json rename to apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth/chainlink.md b/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth/chainlink.md new file mode 100644 index 0000000000..34aca290c3 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/migrate-an-app-to-pyth/chainlink.md @@ -0,0 +1,108 @@ +--- +title: "Migrate from Chainlink to Pyth" +description: "Step-by-step guide to migrate your EVM application from Chainlink price feeds to Pyth using the Chainlink-compatible interface." +icon: "ArrowsClockwise" +--- + +# Migrate from Chainlink to Pyth + +This guide explains how to migrate an EVM application that uses Chainlink price feeds to Pyth price feeds. +Pyth provides a Chainlink-compatible interface for its price feeds to make this process simple. +There are two main steps to the migration: + +1. Deploy the [`PythAggregatorV3`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/PythAggregatorV3.sol) contract to provide a Chainlink-compatible feed interface. +2. Schedule price updates for the feeds required by your app. + +## Install Pyth SDKs + +The `PythAggregatorV3` contract is provided in the [Pyth Price Feeds Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/solidity). +Add this SDK to the dependencies of your EVM contract. + +**Truffle/Hardhat** + +If you are using Truffle or Hardhat, simply install the NPM package: + +```bash copy +npm install @pythnetwork/pyth-sdk-solidity +``` + +**Foundry** + +If you are using Foundry, you will need to create an NPM project if you don't already have one. +From the root directory of your project, run: + +```bash copy +npm init -y +npm install @pythnetwork/pyth-sdk-solidity +``` + +Then add the following line to your `remappings.txt` file: + +```text copy +@pythnetwork/pyth-sdk-solidity/=node_modules/@pythnetwork/pyth-sdk-solidity +``` + +## Deploy Adapter Contract + +First, deploy the `PythAggregatorV3` contract from `@pythnetwork/pyth-sdk-solidity` as a replacement for your application's Chainlink price feeds. +`PythAggregatorV3` is an adapter contract that wraps the Pyth contract and implements Chainlink's `AggregatorV3Interface`. + +One important difference between Pyth and Chainlink is that the Pyth contract holds data for all price feeds; in contrast, Chainlink has separate instances of `AggregatorV3Interface` for each feed. +The adapter contract resolves this discrepancy by wrapping a single Pyth price feed. +Users should deploy an instance of this adapter for every required price feed, then point their existing app to the addresses of the deployed adapter contracts. + +The following `forge` deployment script demonstrates the expected deployment process: + +```solidity copy +// SPDX-License-Identifier: Apache 2 +pragma solidity ^0.8.0; + +import "forge-std/Script.sol"; +import { PythAggregatorV3 } from "@pythnetwork/pyth-sdk-solidity/PythAggregatorV3.sol"; +import { ChainlinkApp } from "./ChainlinkApp.sol"; + +contract PythAggregatorV3Deployment is Script { + function run() external { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + vm.startBroadcast(deployerPrivateKey); + + // Get the address for your ecosystem from: + // https://docs.pyth.network/price-feeds/contract-addresses/evm + address pythPriceFeedsContract = 0xff1a0f4744e8582DF1aE09D5611b887B6a12925C; + // Get the price feed ids from: + // https://docs.pyth.network/price-feeds/price-feeds + bytes32 ethFeedId = 0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace; + bytes32 solFeedId = 0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d; + + // Deploy an instance of PythAggregatorV3 for every feed. + PythAggregatorV3 ethAggregator = new PythAggregatorV3( + pythPriceFeedsContract, + ethFeedId + ); + PythAggregatorV3 solAggregator = new PythAggregatorV3( + pythPriceFeedsContract, + solFeedId + ); + + // Pass the address of the PythAggregatorV3 contract to your chainlink-compatible app. + ChainlinkApp app = new ChainlinkApp( + address(ethAggregator), + address(solAggregator) + ); + + vm.stopBroadcast(); + } +} + +``` + +Please see the [Chainlink Migration Example](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/evm/chainlink_migration) for a runnable version of the example above. + +## Schedule Updates + +Chainlink-compatible applications typically expect on-chain price feeds to update on a schedule. +When migrating to Pyth, apps may need to schedule these price updates themselves. +This step is required because Pyth is a pull oracle; see [What is a pull oracle?](/price-feeds/pull-updates.mdx) to learn more about this topic. + +The [Sponsored Feeds](/price-feeds/sponsored-feeds.mdx) page shows a list of feeds that have scheduled on-chain updates. +If the feeds your application needs are not on this list, see [Schedule Price Updates](/price-feeds/schedule-price-updates) for several options to solve this problem. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/price-feeds.mdx b/apps/developer-hub/content/docs/price-feeds/price-feeds.mdx similarity index 77% rename from apps/developer-hub/content/docs/price-feeds/v1/price-feeds.mdx rename to apps/developer-hub/content/docs/price-feeds/price-feeds.mdx index cd0af73b2a..1261b7efef 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/price-feeds.mdx +++ b/apps/developer-hub/content/docs/price-feeds/price-feeds.mdx @@ -1,12 +1,12 @@ --- -title: "Pyth Price Feeds: Real-Time Data & Asset Identifiers" -description: >- - Get real-time Pyth Price Feeds with unique IDs for every blockchain asset - class. Learn to fetch, identify, and integrate them effortlessly. -full: false -index: false +title: Price Feeds +description: Real-time, first-party market data with unique IDs for a wide range of assets +icon: Chart +full: true --- +import { PriceFeedIds } from "../../components/PriceFeedIds"; + # Price Feeds Pyth Price Feeds provide real-time, first-party, market data for a wide range of assets. @@ -31,10 +31,25 @@ Applications need to store the IDs of the feeds they wish to read. However, the IDs may be represented in different formats (e.g. hex or base58) depending on the blockchain. Price feeds also have different IDs in the Stable and Beta channels. -Refer to the [Price Feed ID reference catalog](https://www.pyth.network/developers/price-feed-ids) to identify a feed's ID in your chosen ecosystem. - ### Solana Price Feed Accounts On Solana, each feed additionally has a collection of **price feed accounts** containing the feed's data. The addresses of these accounts are programmatically derived from the feed id and a shard id, which is simply a 16-bit number. See [How to Use Real-Time Data on Solana](./use-real-time-data/solana#price-feed-accounts) for more information on price feed accounts. + +## Feed Ids + + + Important Note for **Testnet** Users + +Developers using any of these testnets: + +- Aptos Testnet +- Sui Testnet +- Near Testnet + +Please use the **Beta** price feed IDs instead of the stable ones. + + + + diff --git a/apps/developer-hub/content/docs/price-feeds/v1/price-feeds/_meta.json b/apps/developer-hub/content/docs/price-feeds/price-feeds/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/price-feeds/_meta.json rename to apps/developer-hub/content/docs/price-feeds/price-feeds/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/price-feeds/asset-classes.mdx b/apps/developer-hub/content/docs/price-feeds/price-feeds/asset-classes.mdx similarity index 92% rename from apps/developer-hub/content/docs/price-feeds/v1/price-feeds/asset-classes.mdx rename to apps/developer-hub/content/docs/price-feeds/price-feeds/asset-classes.mdx index 6fc5026e7c..e3bce27c4e 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/price-feeds/asset-classes.mdx +++ b/apps/developer-hub/content/docs/price-feeds/price-feeds/asset-classes.mdx @@ -1,11 +1,7 @@ --- -title: Understanding Asset Classes in Pyth Price Feeds -description: >- - Real-time Pyth price feeds for crypto, equities, FX, metals, commodities, and - energy. Integrate these feeds into trading and analytics systems to support - data-driven decision-making. -full: false -index: false +title: "Asset Classes" +description: "Explore the different asset classes available in Pyth price feeds including crypto, equities, FX, metals, rates, commodities, and energy." +icon: "ChartBar" --- # Asset Classes diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data.mdx b/apps/developer-hub/content/docs/price-feeds/publish-data.mdx similarity index 89% rename from apps/developer-hub/content/docs/price-feeds/v1/publish-data.mdx rename to apps/developer-hub/content/docs/price-feeds/publish-data.mdx index 9d71e5a708..3d0774757c 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/publish-data.mdx +++ b/apps/developer-hub/content/docs/price-feeds/publish-data.mdx @@ -1,10 +1,7 @@ --- -title: "How to Publish Data on Pyth Network: Step-by-Step Guide" -description: >- - To publish data on the Pyth Network, request access, generate a keypair, - configure validator connections, and integrate with pyth-agent. -full: false -index: false +title: "Publish Data" +description: "Learn how to become a data provider and publish first-party data to the Pyth Network, including setting up keypairs and validators." +icon: "broadcast" --- # Publish Data @@ -26,7 +23,7 @@ If you do not already have a keypair, you can create one using the instructions ```sh copy # Install the Solana Tool Suite, needed for creating the key used to sign your transactions. # See https://docs.solana.com/cli/install-solana-cli-tools for the latest version -sh -c "$(curl -sSfL https://release.solana.com/v1.14.13/install)" +sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" # Generate a public/private keypair. solana-keygen new --no-bip39-passphrase --outfile publish_key_pair.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/_meta.json b/apps/developer-hub/content/docs/price-feeds/publish-data/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/publish-data/_meta.json rename to apps/developer-hub/content/docs/price-feeds/publish-data/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/confidence-interval-and-crypto-exchange-fees.mdx b/apps/developer-hub/content/docs/price-feeds/publish-data/confidence-interval-and-crypto-exchange-fees.mdx similarity index 84% rename from apps/developer-hub/content/docs/price-feeds/v1/publish-data/confidence-interval-and-crypto-exchange-fees.mdx rename to apps/developer-hub/content/docs/price-feeds/publish-data/confidence-interval-and-crypto-exchange-fees.mdx index bc5c390b9e..eb31bb61b8 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/confidence-interval-and-crypto-exchange-fees.mdx +++ b/apps/developer-hub/content/docs/price-feeds/publish-data/confidence-interval-and-crypto-exchange-fees.mdx @@ -1,11 +1,7 @@ --- -title: Crypto Fee Adjustments for Accurate Confidence Intervals -description: >- - Learn Pyth Core’s fee-adjusted crypto pricing for confidence interval - calculations with multi-exchange order book modeling and precise data - adjustments. -full: false -index: false +title: "Confidence Interval and Crypto Exchange Fees" +description: "Learn how to properly adjust crypto exchange prices for aggressive fees when calculating confidence intervals for Pyth price publishing." +icon: "percent" --- # Confidence Interval and Crypto Exchange Fees @@ -21,12 +17,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 -![](./assets/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. -![](./assets/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/apps/developer-hub/content/docs/price-feeds/v1/publish-data/pyth-client-websocket-api.mdx b/apps/developer-hub/content/docs/price-feeds/publish-data/pyth-client-websocket-api.mdx similarity index 97% rename from apps/developer-hub/content/docs/price-feeds/v1/publish-data/pyth-client-websocket-api.mdx rename to apps/developer-hub/content/docs/price-feeds/publish-data/pyth-client-websocket-api.mdx index f91f3a03e4..45133317dd 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/pyth-client-websocket-api.mdx +++ b/apps/developer-hub/content/docs/price-feeds/publish-data/pyth-client-websocket-api.mdx @@ -1,10 +1,7 @@ --- -title: "pyth-agent WebSocket API: JSON-RPC Methods & Usage" -description: >- - The Pyth Client WebSocket API provides real-time market data using JSON-RPC - 2.0 methods such as get_product_list, update_price, and subscribe_price_sched. -full: false -index: false +title: "Pyth Agent WebSocket API" +description: "Complete reference for the pyth-agent WebSocket API based on JSON-RPC 2.0 standard for price publishing and data retrieval." +icon: "broadcast" --- # pyth-agent API diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/understanding-publishing-slots.mdx b/apps/developer-hub/content/docs/price-feeds/publish-data/understanding-publishing-slots.mdx similarity index 96% rename from apps/developer-hub/content/docs/price-feeds/v1/publish-data/understanding-publishing-slots.mdx rename to apps/developer-hub/content/docs/price-feeds/publish-data/understanding-publishing-slots.mdx index f30bd05416..fe1fc83153 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/understanding-publishing-slots.mdx +++ b/apps/developer-hub/content/docs/price-feeds/publish-data/understanding-publishing-slots.mdx @@ -1,10 +1,7 @@ --- -title: "Understanding Publishing Slots in Pyth: How Price Updates Work" -description: >- - Pythnet’s publishing slots deliver ordered price updates on Solana, prevent - on-chain data conflicts, and improve cross-chain update efficiency. -full: false -index: false +title: "Understanding Publishing Slots" +description: "Learn how Pyth handles publishing slots, price aggregation timing, and slot-based ordering to prevent out-of-order price updates." +icon: "clock" --- # Understanding Publishing Slots diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/useful-resources-for-publishers.mdx b/apps/developer-hub/content/docs/price-feeds/publish-data/useful-resources-for-publishers.mdx similarity index 67% rename from apps/developer-hub/content/docs/price-feeds/v1/publish-data/useful-resources-for-publishers.mdx rename to apps/developer-hub/content/docs/price-feeds/publish-data/useful-resources-for-publishers.mdx index 99cde378f4..7f95dc8311 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/useful-resources-for-publishers.mdx +++ b/apps/developer-hub/content/docs/price-feeds/publish-data/useful-resources-for-publishers.mdx @@ -1,11 +1,7 @@ --- -title: "Essential Resources for Pyth Publishers: Monitoring & Analytics" -description: >- - Provides Pyth publishing support on Solana Explorer and Pythnet. Includes - transaction tracking, live price data monitoring, ranking exploration, and - detailed analytics. -full: false -index: false +title: "Useful Resources for Publishers" +description: "Comprehensive collection of tools and resources for Pyth price publishers including monitoring scripts, metrics dashboards, and debugging utilities." +icon: "toolbox" --- # Useful Resources for Publishers @@ -14,7 +10,6 @@ This page contains useful tools for publishers to analyse, monitor and review th - [Price Monitoring & Alerting Script](https://github.com/pyth-network/publisher-utils#monitoring): This monitoring script will provide alerts if a publishers data activity is suspicious i.e. price deviation, bad confidence interval - [Pyth Price Feeds & Metrics](https://pyth.network/price-feeds): Publishers can review their price data metrics for permissioned symbols. The conformance logs that can be downloaded contain useful metrics that show publisher uptime, price deviations and alerts. The metrics page can be accessed by selecting the environment > symbol > publisher key tab -- [Pyth Publisher Ranking Page](https://pyth.network/publishers/ranking): This page provides a full breakdown of publisher ranking and inactive/active price feeds +- [Pyth Publisher Ranking Page](https://insights.pyth.network/publishers): This page provides a full breakdown of publisher ranking and inactive/active price feeds - [Pyth Agent API GitHub Repository](https://github.com/pyth-network/pyth-agent): This repository contains the latest release for the Pyth-Agent API - [Solana Explorer](https://explorer.solana.com): Solana Explorer allows publishers to monitor their public keys balance and transactions. It also provides live cluster statistics. For Pythnet or Pythtest, publishers should select 'Custom RPC URL' and add the the RPC http URL -- [Pythnet Statistics](https://pyth.network/stats): A useful tool to review pythnet uptime per publisher key diff --git a/apps/developer-hub/content/docs/price-feeds/v1/pull-updates.mdx b/apps/developer-hub/content/docs/price-feeds/pull-updates.mdx similarity index 92% rename from apps/developer-hub/content/docs/price-feeds/v1/pull-updates.mdx rename to apps/developer-hub/content/docs/price-feeds/pull-updates.mdx index 71bc9162b2..d90d2661fa 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/pull-updates.mdx +++ b/apps/developer-hub/content/docs/price-feeds/pull-updates.mdx @@ -1,11 +1,8 @@ --- -title: "Pull vs. Push Oracles: Key Differences & Use Cases" -description: >- - Compare push vs. pull oracles by update frequency, latency, blockchain - compatibility, and integration to select the ideal solution for real-time data - needs. -full: false -index: false +title: What is a Pull Oracle? +description: Understanding the differences between push and pull oracles and Pyth's pull-based design +icon: ArrowClockwise +full: true --- # What is a Pull Oracle? @@ -36,7 +33,7 @@ For a more in-depth explanation on the differences between push and pull oracles ## Comparing Push and Pull -{/* ![](./assets/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/apps/developer-hub/content/docs/price-feeds/push-feeds.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds.mdx new file mode 100644 index 0000000000..3e8bbd061c --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds.mdx @@ -0,0 +1,41 @@ +--- +title: "Push Feeds" +description: "Explore Pyth's push feeds that automatically update price data across various networks without manual intervention." +icon: "arrow-circle-up" +--- + +# Push Feeds + +The Pyth Data Association **pushes** price updates for various feeds on some networks. +These feeds are updated at a specific heartbeat rate or when the price changes by a specific percentage. +Applications can depend on receiving updates for these feeds, without having to pull them explicitly. + +The feeds can vary by network. Please see the relevant section below for the network of interest. + +- [EVM](push-feeds/evm) +- [Solana](push-feeds/solana) +- [Fogo](push-feeds/fogo) +- [Aptos](push-feeds/aptos) +- [Movement](push-feeds/movement) +- [Sui](push-feeds/sui) + + + Deviation thresholds can be customized to fit builders' needs, and additional + feeds can be requested for this list. If you need custom thresholds or would + like to see additional feeds, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + + + Push feeds are subject to change with prior notice. Please refer to the [dev- + forum](https://dev-forum.pyth.network/c/announcements/6) for the latest + changes. + + + + DISCLAIMER: While the Pyth Data Association strives to deliver timely updates, + these push feeds may occasionally experience delays in updates caused by chain + halts, gas estimations and other issues. Applications are advised to run their + own price-pusher. Find out how you can run your own price-pusher + [here](/price-feeds/schedule-price-updates/using-price-pusher). + diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/_meta.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/_meta.json similarity index 66% rename from apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/_meta.json rename to apps/developer-hub/content/docs/price-feeds/push-feeds/_meta.json index 41e0cafa6e..c3d7a641aa 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/_meta.json +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/_meta.json @@ -1,6 +1,7 @@ { "evm": "EVM", - "solana": "Solana / SVM", + "solana": "Solana", + "fogo": "Fogo", "aptos": "Aptos", "movement": "Movement", "sui": "Sui" diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/aptos.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds/aptos.mdx new file mode 100644 index 0000000000..dbd2551055 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/aptos.mdx @@ -0,0 +1,13 @@ +import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import aptosMainnet from "../push-feeds/data/aptos/aptos-mainnet.json"; + +# Push Feeds on Aptos + +## Aptos Mainnet + + + If you would like to see additional feeds on this list, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + + diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/aptos/aptos-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/aptos/aptos-mainnet.json new file mode 100644 index 0000000000..cdf018c97f --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/aptos/aptos-mainnet.json @@ -0,0 +1,177 @@ +[ + { + "alias": "APT/USD", + "id": "03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BTC/USD", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SOL/USD", + "id": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USD1/USD", + "id": "0a2425d43486780990d8b63543029e20556be51fd756cca584212f4d539611d4", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "CAKE/USD", + "id": "2356af9529a1064d41e32d617e2ce1dca5733afa901daba9e2b68dee5d53ecf9", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SUI/USD", + "id": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "STAPT/APT.RR", + "id": "2f218a73fb0c46ae8f9f7bb70ffbb232dd0dd65169b6401bfdc9bfb340a66b1a", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "AMI/USD", + "id": "9074ab34363ea1aada15db169f4678c10117e48f1ad1a8ba9f69c2a939c3a377", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SUSDE/USDE.RR", + "id": "271c64ce459937abf721d42552035713b6c58f80eeceab716a624607fda4b10f", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "CETUS/USD", + "id": "e5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BNB/USD", + "id": "2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WBTC/USD", + "id": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "THL/USD", + "id": "74e3fbb0d33e0ed8c0078b56134dcebdae38852f0858a8ea4de4c5ea7474bd42", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDY/USD", + "id": "e393449f6aff8a4b6d3e1165a7c9ebec103685f3b41e60db4277b5b6d10e7326", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WETH/USD", + "id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "THAPT/USD", + "id": "b29276972267db5d64ae718fb7f107ad9e72a79cabf9992f0e9bc75ad451a7f6", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "STONE/USD", + "id": "4dcc2fb96fb89a802ef9712f6bd2246d3607cf95ca5540cb24490d37003f8c46", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "MOD/USD", + "id": "9a2a116d85a31d6f1bed19771105557276457094e31791a892758148aa54023d", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SUSDE/USD", + "id": "ca3ba9a619a4b3755c10ac7d5e760275aa95e9823d38a84fedd416856cdba37c", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDE/USD", + "id": "6ec879b1e9963de5ee97e9c8710b742d6228252a5e2ca12d4ae81d7fe5ee8c5d", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "STHAPT/THAPT.RR", + "id": "ea07fce25d7d716fe6ad10b267451011baadc8f3724b28487026072ddce3ba1b", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "KAPT/USD", + "id": "a44d307a13145b84938740c93155fbea926e9fbdd46d50b67859b8fc47552959", + "time_difference": 15, + "price_deviation": 0.5, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/abstract-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/abstract-mainnet.json new file mode 100644 index 0000000000..f5c1a30bc8 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/abstract-mainnet.json @@ -0,0 +1,23 @@ +[ + { + "alias": "WETH/USD", + "id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "PENGU/USD", + "id": "bed3097008b9b5e3c93bec20be79cb43986b85a996475589351a21e67bae9b61", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/arbitrum-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/arbitrum-mainnet.json new file mode 100644 index 0000000000..bcde19aabb --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/arbitrum-mainnet.json @@ -0,0 +1,30 @@ +[ + { + "alias": "HLP0/USDC.RR", + "id": "aa388e24e74d5dd12145f74fad3180266f78ed08c0a2f47c60583fdb612587ba", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USR/USD.RR", + "id": "512a79cc65f49531f0bbb72956353e79ecdc1e4a6e5241847196c1f9a11d8a52", + "time_difference": 21600, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WSTUSR/USR.RR", + "id": "b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706", + "time_difference": 21600, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "RLP/USD.RR", + "id": "796bcb684fdfbba2b071c165251511ab61f08c8949afd9e05665a26f69d9a839", + "time_difference": 21600, + "price_deviation": 0.5, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/avalanche-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/avalanche-mainnet.json new file mode 100644 index 0000000000..207b470edd --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/avalanche-mainnet.json @@ -0,0 +1,9 @@ +[ + { + "alias": "HLP0/USDC.RR", + "id": "aa388e24e74d5dd12145f74fad3180266f78ed08c0a2f47c60583fdb612587ba", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/base-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/base-mainnet.json new file mode 100644 index 0000000000..64dafd4849 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/base-mainnet.json @@ -0,0 +1,86 @@ +[ + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WETH/USD", + "id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "CBETH/USD", + "id": "15ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce5717", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTETH/USD", + "id": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SUI/USD", + "id": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "XRP/USD", + "id": "ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USR/USD", + "id": "10b013adec14c0fe839ca0fe54cec9e4d0b6c1585ac6d7e70010dac015e57f9c", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USR/USD.RR", + "id": "512a79cc65f49531f0bbb72956353e79ecdc1e4a6e5241847196c1f9a11d8a52", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "RLP/USD", + "id": "7265d5cf8ee0e7b5266f75ff19c42c5b7697a9756c9304aa78b6be4fbb8d823d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "RLP/USD.RR", + "id": "796bcb684fdfbba2b071c165251511ab61f08c8949afd9e05665a26f69d9a839", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTUSR/USR.RR", + "id": "b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/berachain-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/berachain-mainnet.json new file mode 100644 index 0000000000..dc348a26a2 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/berachain-mainnet.json @@ -0,0 +1,65 @@ +[ + { + "alias": "BERA/USD", + "id": "962088abcfdbdb6e30db2e340c8cf887d9efb311b1f2f17b155a63dbb6d40265", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "BTC/USD", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "PYUSD/USD", + "id": "c1da1b73d7f01e7ddd54b3766cf7fcd644395ad14f70aa706ec5384c59e76692", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SUSDE/USDE.RR", + "id": "271c64ce459937abf721d42552035713b6c58f80eeceab716a624607fda4b10f", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HONEY/USD", + "id": "f67b033925d73d43ba4401e00308d9b0f26ab4fbd1250e8b5407b9eaade7e1f4", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HONEY/USD.RR", + "id": "8bb3695875f9c33594097b0e0a1daa881aa81290088f0eac3a07b700fc7612ba", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/ethereum-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/ethereum-mainnet.json new file mode 100644 index 0000000000..c645685b84 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/ethereum-mainnet.json @@ -0,0 +1,44 @@ +[ + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 3600, + "price_deviation": 2, + "confidence_ratio": 100 + }, + { + "alias": "USR/USD", + "id": "10b013adec14c0fe839ca0fe54cec9e4d0b6c1585ac6d7e70010dac015e57f9c", + "time_difference": 3600, + "price_deviation": 2, + "confidence_ratio": 100 + }, + { + "alias": "WSTUSR/USR", + "id": "b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706", + "time_difference": 3600, + "price_deviation": 2, + "confidence_ratio": 100 + }, + { + "alias": "USDTB/NAV", + "id": "967549f1ff4869f41cb354a7116b9e5a9a3091bebe0b2640eeed745ca1f7f90b", + "time_difference": 3600, + "price_deviation": 2, + "confidence_ratio": 100 + }, + { + "alias": "LINEA/USD", + "id": "49e50653755fbf8018ab65a07be2f208ac8c4bdfc43200934304ca17ee663cab", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "BOLD/USD", + "id": "d6134dbb0427240f901e3e596d6e63f7d85088f96cd4cd4ae2f89c0819b5d623", + "time_difference": 3600, + "price_deviation": 0.5, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/hyperevm-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/hyperevm-mainnet.json new file mode 100644 index 0000000000..b9adffa05c --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/hyperevm-mainnet.json @@ -0,0 +1,303 @@ +[ + { + "alias": "BTC/USD", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HYPE/USD", + "id": "4279e31cc369bbcc2faf022b382b080e32a8e689ff20fbc530d2a603eb6cd98b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTETH/USD", + "id": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTETH/STETH.RR", + "id": "f59ead01ed0faba85332a1e2feae8ddb14a1c94ebac259f1c982c92fc7ce333e", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WBTC/USD", + "id": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WETH/USD", + "id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDE/USD", + "id": "6ec879b1e9963de5ee97e9c8710b742d6228252a5e2ca12d4ae81d7fe5ee8c5d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SUSDE/USD", + "id": "ca3ba9a619a4b3755c10ac7d5e760275aa95e9823d38a84fedd416856cdba37c", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SUSDE/USDE.RR", + "id": "271c64ce459937abf721d42552035713b6c58f80eeceab716a624607fda4b10f", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTHYPE/STHYPE.RR", + "id": "1a78b5829a99f1d2897917dae2a02266c0210535a995a2e9d0692613bbc89e27", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "LHYPE/USD", + "id": "9e3cadc2a8a0ebfd765b34d5ee5de77a4add3114672fc0b8d3ad09ac56940069", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "FHYPE/HYPE.RR", + "id": "8f749681c078ce4ef65cd220994f25735b80264fca4386dd57b31eacf7e4610b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDXL/USD", + "id": "e10593860e9ee1c204e4f9569e877502f098dd1a4d84cc5bad06f23f77dcbfe2", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "MHYPE/HYPE.RR", + "id": "e35aebd2d35795acaa2b0e59f3b498510e8ef334986d151d1502adb9e26234f7", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "FEUSD/USD", + "id": "7f2e9a7365eb634c543e9ca72683a9cf778cdc16ee5b8bca73abe6d08c1410d5", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "MHYPE/USD", + "id": "a7fb4cdafed5130e8731b8da7c9208881f24e9b671bb92438b1fbf361d578112", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "STHYPE/USD", + "id": "068cd0617cbdd1dda615ed2b5ab4fe07d2e9f46347f5e785484844aa10d22dc5", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "UETH/USD", + "id": "08c73e187b45ecb2ab8375b975865d3c4a225fef1ccc7f326ad6eec66a24567a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "UBTC/USD", + "id": "42bfb26778f3504a9f359a92c731f77d0c24aed9b7745276e3ad0c2d840b74c2", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "CMETH/METH.RR", + "id": "cef5ad3be493afef85e77267cb0c07d048f3d54055409a34782996607e48cf0a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "METH/ETH.RR", + "id": "ee279eeb2fec830e3f535ad4d6524eb35eb1c6890cb1afc0b64554d08c88727e", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USR/USD.RR", + "id": "512a79cc65f49531f0bbb72956353e79ecdc1e4a6e5241847196c1f9a11d8a52", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USOL/USD", + "id": "974c7a77dbace44d229be17fc176975e06404b004476aeaff37641818cb0c55a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "BUDDY/USD", + "id": "ac2adf4571a391da22a2d39e8c5eb32ceecd6ab38c386a9194d669deece74dee", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "XAU/USD", + "id": "765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDHL/USD", + "id": "1497fb795ae65533d36d147b1b88c8b7226866a201589904c13acd314f694799", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "UFART/USD", + "id": "a210f55ff119d315002b5dc4f763b4e4114197028e45d6aca16498ab1433fb6d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USH/USD", + "id": "eaa30c1ef2d9f4fde45d6e699bfda5187b3de200ea4cbab25d676b260ab728c1", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HWHLP/USDC", + "id": "d136d4fd8d5f41c42339bcaf79954cfc2d50a33b129a990f8a2087d73cadade9", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WHLP/USDC", + "id": "b94c49af07479932872c63126f6bdee78140be7a953435e3815c8e1b204a0a04", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "STLOOP/LOOP", + "id": "1d99073631da1f959284bae0be4d027cfd41c98f4b6a95d20ccf4208a3a4b1f1", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HLP0/USDC.RR", + "id": "aa388e24e74d5dd12145f74fad3180266f78ed08c0a2f47c60583fdb612587ba", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "KHYPE/HYPE.RR", + "id": "983b7cabc6fab548e15a5b05500da9b99c1682107b3e2ff289344116c10ac02c", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTUSR/USR.RR", + "id": "b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "RLP/USD.RR", + "id": "796bcb684fdfbba2b071c165251511ab61f08c8949afd9e05665a26f69d9a839", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "KHYPE/USD", + "id": "2837a61ae8165c018b0e406ac32b1527270e57b81f0069260afbef71b9cf8ffe", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HAHYPE/HYPE.RR", + "id": "19aec77cb70be18c66df7afd33da651d7b376fd26f7c06f2e8b77536c820a281", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "APE/USD", + "id": "15add95022ae13563a11992e727c91bdb6b55bc183d9d747436c80a483d8c864", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDH/USD", + "id": "f364e785775b4cb2f159ea823f8b5b9b669a4c221a3f845e518ba0e09611c553", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "THBILL/USDC.RR", + "id": "5b1bc5a579deba54dbaa9bc1c5b2e2b3f116d8d5ec27fbb3b9dc140a78e9f1e2", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/linea-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/linea-mainnet.json new file mode 100644 index 0000000000..c1beb48100 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/linea-mainnet.json @@ -0,0 +1,16 @@ +[ + { + "alias": "REX33/USD", + "id": "583015352f5936e099fa7149d496ac087c5bfbfc386ce875be27dc4d69c2e023", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "LINEA/USD", + "id": "49e50653755fbf8018ab65a07be2f208ac8c4bdfc43200934304ca17ee663cab", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/soneium-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/soneium-mainnet.json new file mode 100644 index 0000000000..9c5617066f --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/soneium-mainnet.json @@ -0,0 +1,23 @@ +[ + { + "alias": "USR/USD.RR", + "id": "512a79cc65f49531f0bbb72956353e79ecdc1e4a6e5241847196c1f9a11d8a52", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "RLP/USD.RR", + "id": "796bcb684fdfbba2b071c165251511ab61f08c8949afd9e05665a26f69d9a839", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTUSR/USR.RR", + "id": "b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/sonic-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/sonic-mainnet.json new file mode 100644 index 0000000000..cbb23ba80a --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/evm/sonic-mainnet.json @@ -0,0 +1,107 @@ +[ + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WETH/USD", + "id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WBTC/USD", + "id": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "BTC/USD", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "S/USD", + "id": "f490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTKSCETH/SCETH.RR", + "id": "b680422b70915df562e4802bd8679112ff0f6b0a29ec2c3762ae2720eda01e58", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTKSCUSD/SCUSD.RR", + "id": "caed0964240861da425cf03fae9737473f6f031fb80cbbd73c3fb8cddd7a2204", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "STS/S.RR", + "id": "3b14bd355f182fa3a3feeea6824228e1f71e7c221a37bc91e8307280aee6a803", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "ANON/USD", + "id": "7a36855b8a4a6efd701ed82688694bbf67602de9faae509ae28f91065013cb82", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "GOGLZ/USD", + "id": "82465d1155ddbb2c73bf3491457163000f8e8d02dea90c548b1b7e56ae9fe4b1", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SHADOW/USD", + "id": "6f02ad2b8a307411fc3baedb9876e83efe9fa9f5b752aab8c99f4742c9e5f5d5", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "STS/USD", + "id": "19f463beb47cb398cf2e2c8037f1d0073583cf18209c91a636f051d755ce0662", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "HLP0/USDC.RR", + "id": "aa388e24e74d5dd12145f74fad3180266f78ed08c0a2f47c60583fdb612587ba", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/movement/movement-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/movement/movement-mainnet.json new file mode 100644 index 0000000000..43b423f1b8 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/movement/movement-mainnet.json @@ -0,0 +1,163 @@ +[ + { + "alias": "MOVE/USD", + "id": "6bf748c908767baa762a1563d454ebec2d5108f8ee36d806aadacc8f0a075b6d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "APT/USD", + "id": "03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SUSDE/USD", + "id": "ca3ba9a619a4b3755c10ac7d5e760275aa95e9823d38a84fedd416856cdba37c", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WETH/USD", + "id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "MOD/USD", + "id": "9a2a116d85a31d6f1bed19771105557276457094e31791a892758148aa54023d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "THAPT/USD", + "id": "b29276972267db5d64ae718fb7f107ad9e72a79cabf9992f0e9bc75ad451a7f6", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "STHAPT/APT.RR", + "id": "ea07fce25d7d716fe6ad10b267451011baadc8f3724b28487026072ddce3ba1b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "FRXUSD/USD", + "id": "7c53208632935ba5122c3cf65a0f4b3e72ba4955b49ad6ba0acf3d9ba405aef3", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "LBTC/USD", + "id": "8f257aab6e7698bb92b15511915e593d6f8eae914452f781874754b03d0c612b", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "BTC/USD", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WBTC/USD", + "id": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WSTETH/USD", + "id": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "SOLVBTC/USD", + "id": "f253cf87dc7d5ed5aa14cba5a6e79aee8bcfaef885a0e1b807035a0bbecc36fa", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "AVALON.USDA/USD", + "id": "37c307959acbb353e1451bcf7da9d305c8cb8d54c64353588aaf900ffcffdd7d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WEETH/USD", + "id": "9ee4e7c60b940440a261eb54b6d8149c23b580ed7da3139f7f08f4ea29dad395", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "WEETH/ETH.RR", + "id": "343558e79f587e098c321218ecb34d031ba709ab3e84133126f3c98511b91f64", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "EZETH/USD", + "id": "06c217a791f5c4f988b36629af4cb88fad827b2485400a358f3b02886b54de92", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "RSETH/USD", + "id": "0caec284d34d836ca325cf7b3256c078c597bc052fbd3c0283d52b581d68d71f", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "MBTC/USD", + "id": "6665073f5bc307b97e68654ff11f3d8875abd6181855814d23ab01b8085c0906", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + }, + { + "alias": "USDE/USD", + "id": "6ec879b1e9963de5ee97e9c8710b742d6228252a5e2ca12d4ae81d7fe5ee8c5d", + "time_difference": 3600, + "price_deviation": 1, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/sui/sui-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/sui/sui-mainnet.json new file mode 100644 index 0000000000..ff6135a5d2 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/sui/sui-mainnet.json @@ -0,0 +1,268 @@ +[ + { + "alias": "AFSUI/USD", + "id": "17cd845b16e874485b2684f8b8d1517d744105dbb904eec30222717f4bc9ee0d", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "AUSD/USD", + "id": "d9912df360b5b7f21a122f15bdd5e27f62ce5e72bd316c291f7c86620e07fb2a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BLUB/USD", + "id": "5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c", + "time_difference": 60, + "price_deviation": 3, + "confidence_ratio": 100 + }, + { + "alias": "BLUE/USD", + "id": "04cfeb7b143eb9c48e9b074125c1a3447b85f59c31164dc20c1beaa6f21f2b6b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BNB/USD", + "id": "2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BTC/USD", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BUCK/USD", + "id": "fdf28a46570252b25fd31cb257973f865afc5ca2f320439e45d95e0394bc7382", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "CETUS/USD", + "id": "e5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "DEEP/USD", + "id": "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "DMC/USD", + "id": "8abfa63ae82ca2fbc271861375e497166d8792580fb7c2ffcf014d2a131433f0", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "DOGE/USD", + "id": "dcef50dd0a4cd2dcc17e45df1676dcb336a11a61c69df7a0299b0150c672d25c", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "FDUSD/USD", + "id": "ccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "FUD/USD", + "id": "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "HAEDAL/USD", + "id": "e67d98cc1fbd94f569d5ba6c3c3c759eb3ffc5d2b28e64538a53ae13efad8fd1", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "HASUI/USD", + "id": "6120ffcf96395c70aa77e72dcb900bf9d40dccab228efca59a17b90ce423d5e8", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "HIPPO/USD", + "id": "f2c5249856da2fbe0221e163b3fed678dd6f76515ab933292dfb4f15a1de8f8c", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "IKA/USD", + "id": "2b529621fa6e2c8429f623ba705572aa64175d7768365ef829df6a12c9f365f4", + "time_difference": 60, + "price_deviation": 3, + "confidence_ratio": 100 + }, + { + "alias": "LBTC/USD", + "id": "8f257aab6e7698bb92b15511915e593d6f8eae914452f781874754b03d0c612b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "LOFI/USD", + "id": "82eebc2c47490ba9c0f9bc35ea9fb57a7e2bbf69b84a04ea2a3525153b8090ea", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "MUSD/USD", + "id": "2ee09cdb656959379b9262f89de5ff3d4dfed0dd34c072b3e22518496a65249c", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "NAVX/USD", + "id": "88250f854c019ef4f88a5c073d52a18bb1c6ac437033f5932cd017d24917ab46", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "NS/USD", + "id": "bb5ff26e47a3a6cc7ec2fce1db996c2a145300edc5acaabe43bf9ff7c5dd5d32", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SCA/USD", + "id": "7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SEND/USD", + "id": "7d19b607c945f7edf3a444289c86f7b58dcd8b18df82deadf925074807c99b59", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SOL/USD", + "id": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "STSUI/USD", + "id": "0b3eae8cb6e221e7388a435290e0f2211172563f94769077b7f4c4c6a11eea76", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SUI/USD", + "id": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "TRX/USD", + "id": "67aed5a24fdad045475e7195c98a98aea119c763f272d4523f5bac93a4f33c2b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "TURBOS/USD", + "id": "f9c2e890443dd995d0baafc08eea3358be1ffb874f93f99c30b3816c460bbac3", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDY/USD", + "id": "e393449f6aff8a4b6d3e1165a7c9ebec103685f3b41e60db4277b5b6d10e7326", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "VSUI/USD", + "id": "57ff7100a282e4af0c91154679c5dae2e5dcacb93fd467ea9cb7e58afdcfde27", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WAL/USD", + "id": "eba0732395fae9dec4bae12e52760b35fc1c5671e2da8b449c9af4efe5d54341", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "XAUM/USD.RR", + "id": "d7db067954e28f51a96fd50c6d51775094025ced2d60af61ec9803e553471c88", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "UP/USD", + "id": "c591a547856b091560b120ee14b165a84ca58eca23b2ab635df641340bde1f10", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "XRP/USD", + "id": "ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/svm/fogo-testnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/svm/fogo-testnet.json new file mode 100644 index 0000000000..383a9a548e --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/svm/fogo-testnet.json @@ -0,0 +1,34 @@ +[ + { + "alias": "FOGO/USD", + "account_address": "BVbxoxUoiS7hDGbhr6WYQod2qQsxs4gjTqFB8LekW1yt", + "id": "d3cd2bae6315f4f940cbd3a4a915f675f8fba85e33bd6aa5f7b727a15a9c812f", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "fUSD/USD", + "account_address": "9BZ6ozhtcTRYYMCBDLfePaoNTdEzpgZR3p4pHdM3CrVf", + "id": "8d940f7b53df8dd4b3c33a84c3ba043214c3cdcd5243c03b7cb4b0b22746efd8", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "account_address": "8mKftY1J7M9FhmUA5iPF49G4ptHeh7tk2f5hgPQHqJsK", + "id": "41f3625971ca2ed2263e78573fe5ce23e13d2558ed3f2e47ab0f84fb9e7ae722", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "account_address": "86rHPbbzG8rnh4cQownzRHj9kLM9xY3YsSQM5xddtBZ6", + "id": "1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/data/svm/solana-mainnet.json b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/svm/solana-mainnet.json new file mode 100644 index 0000000000..1f5392733e --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/data/svm/solana-mainnet.json @@ -0,0 +1,338 @@ +[ + { + "alias": "SOL/USD", + "account_address": "7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE", + "id": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "MSOL/USD", + "account_address": "5CKzb9j4ChgLUt8Gfm5CNGLN6khXKiqMbnGAW4cgXgxK", + "id": "c2289a6a43d2ce91c6f55caec370f4acc38a2ed477f58813334c6d03749ff2a4", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BSOL/USD", + "account_address": "5cN76Xm2Dtx9MnrQqBDeZZRsWruTTcw37UruznAdSvvE", + "id": "89875379e70f8fbadc17aef315adf3a8d5d160b811435537e03c97e8aac97d9c", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SSOL/SOL", + "account_address": "2doCYXwYNt2FhzfCdgpW4YAwczvdzB27xtJkzQd5Kre2", + "id": "add6499a420f809bbebc0b22fbf68acb8c119023897f6ea801688e0d6e391af4", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BONK/USD", + "account_address": "DBE3N8uNjhKPRHfANdwGvCZghWXyLPdqdSbEW2XFwBiX", + "id": "72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "W/USD", + "account_address": "BEMsCSQEGi2kwPA4mKnGjxnreijhMki7L4eeb96ypzF9", + "id": "eff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "MEW/USD", + "account_address": "EF6U755BdHMXim8RBw6XSC6Yk6XaouTKpwcBZ7QkcanB", + "id": "514aed52ca5294177f20187ae883cec4a018619772ddce41efcc36a6448f5d5d", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDC/USD", + "account_address": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX", + "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BTC/USD", + "account_address": "4cSM2e6rvbGQUFiJbqytoVMi5GgghSMr8LwVrT9VPSPo", + "id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "USDT/USD", + "account_address": "HT2PLQBcG5EiCcNSaMHAjSgd9F98ecpATbk4Sk5oYuM", + "id": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "JUP/USD", + "account_address": "7dbob1psH1iZBS7qPsm3Kwbf5DzSXK8Jyg31CTgTnxH5", + "id": "0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "ETH/USD", + "account_address": "42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC", + "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "PYTH/USD", + "account_address": "8vjchtMuJNY4oFQdTi8yCe6mhCaNBFaUbktT482TpLPS", + "id": "0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "HNT/USD", + "account_address": "4DdmDswskDxXGpwHrXUfn2CNUm9rt21ac79GHNTN3J33", + "id": "649fdd7ec08e8e2a20f425729854e90293dcbe2376abc47197a14da6ff339756", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "ORCA/USD", + "account_address": "4CBshVeNBEXz24GZpoj8SrqP5L7VGG3qjGd6tCST1pND", + "id": "37505261e557e251290b8c8899453064e8d760ed5c65a779726f2490980da74c", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SAMO/USD", + "account_address": "2eUVzcYccqXzsDU1iBuatUaDCbRKBjegEaPPeChzfocG", + "id": "49601625e1a342c1f90c3fe6a03ae0251991a1d76e480d2741524c29037be28a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WIF/USD", + "account_address": "6B23K3tkb51vLZA14jcEQVCA1pfHptzEHFA93V5dYwbT", + "id": "4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "INF/USD", + "account_address": "Ceg5oePJv1a6RR541qKeQaTepvERA3i8SvyueX9tT8Sq", + "id": "f51570985c642c49c2d6e50156390fdba80bb6d5f7fa389d2f012ced4f7d208f", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "MNDE/USD", + "account_address": "GHKcxocPyzSjy7tWApQjKRkDNuVXd4Kk624zhuaR7xhC", + "id": "3607bf4d7b78666bd3736c7aacaf2fd2bc56caa8667d3224971ebe3c0623292a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "NEON/USD", + "account_address": "F2VfCymdNQiCa8Vyg5E7BwEv9UPwfm8cVN6eqQLqXiGo", + "id": "d82183dd487bef3208a227bb25d748930db58862c5121198e723ed0976eb92b7", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "AUD/USD", + "account_address": "6pPXqXcgFFoLEcXfedWJy3ypNZVJ1F3mgipaDFsvZ1co", + "id": "67a6f93030420c1c9e3fe37c1ab6b77966af82f995944a9fefce357a22854a80", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "GBP/USD", + "account_address": "G25Tm7UkVruTJ7mcbCxFm45XGWwsH72nJKNGcHEQw1tU", + "id": "84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "EUR/USD", + "account_address": "Fu76ChamBDjE8UuGLV6GP2AcPPSU6gjhkNhAyuoPm7ny", + "id": "a995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "XAG/USD", + "account_address": "H9JxsWwtDZxjSL6m7cdCVsWibj3JBMD9sxqLjadoZnot", + "id": "f2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "XAU/USD", + "account_address": "2uPQGpm8X4ZkxMHxrAW1QuhXcse1AHEgPih6Xp9NuEWW", + "id": "765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "BLZE/USD", + "account_address": "FFv5yoCGhEgWv6mXhwv4KX8A2dYcVAzi88a6Yu8Tf3iB", + "id": "93c3def9b169f49eed14c9d73ed0e942c666cf0e1290657ec82038ebb792c2a8", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "JLP/USD", + "account_address": "2TTGSRSezqFzeLUH8JwRUbtN66XLLaymfYsWRTMjfiMw", + "id": "c811abc82b4bad1f9bd711a2773ccaa935b03ecef974236942cec5e0eb845a3a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WBTC/USD", + "account_address": "9gNX5vguzarZZPjTnE1hWze3s6UsZ7dsU3UnAmKPnMHG", + "id": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "PENGU/USD", + "account_address": "27zzC5wXCeZeuJ3h9uAJzV5tGn6r5Tzo98S1ZceYKEb8", + "id": "bed3097008b9b5e3c93bec20be79cb43986b85a996475589351a21e67bae9b61", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "TRUMP/USD", + "account_address": "9vNb2tQoZ8bB4vzMbQLWViGwNaDJVtct13AGgno1wazp", + "id": "879551021853eec7a7dc827578e8e69da7e4fa8148339aa0d3d5296405be4b1a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "FARTCOIN/USD", + "account_address": "2t8eUbYKjidMs3uSeYM9jXM9uudYZwGkSeTB4TKjmvnC", + "id": "58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "ACRED/USD", + "account_address": "6gyQ2TKvvV1JB5oWDobndv6BLRWcJzeBNk9PLQ5uPQms", + "id": "40ac3329933a6b5b65cf31496018c5764ac0567316146f7d0de00095886b480d", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "PUMP/USD", + "account_address": "HMm3GPbdnqGwbkTnUUqCFsH8AMHDdEC3Lg8gcPD3HJSH", + "id": "7a01fca212788bba7c5bf8c9efd576a8a722f070d2c17596ff7bb609b8d5c3b9", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "JUPSOL/SOL.RR", + "account_address": "D7UqeBmCEmhGXGYfi2y9RfoCa7t1Xw5iZLBeYZ3sxFSe", + "id": "f8d8d6b6c866c8b2624fb5b679ae846738725e5fc887fa8e927c8d8645018a2b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "NAV.USTB/USD", + "account_address": "EqggHKbjePzmXAX6MW3EsgjiJ4mhkbb8j5s5KfGs1gLq", + "id": "dea78edd10cd7ae4524cc1744216788746306623bc3553014eeab6062860795d", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "NAV.USCC/USD", + "account_address": "823Y4cV7XH2TzkB9NdHfTRoCKLrqXv8EgQP5nzEG43Hp", + "id": "5d73a5953dc86c4773adc778c30e8a6dfc94c5c3a74d7ebb56dd5e70350f044a", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WTIV5/USD", + "account_address": "79Qk7eiaFDTPdny4ha6vG3SYtRSdJ9tCqSpYPvxmq3WW", + "id": "1fd93efedb8b2db34465b5dbad8beca7288ad8bbcd47213ab1fdfe57ac86a240", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "ZBTC/USD", + "account_address": "7qFJxM2GefbY2td7cXb6bmXmwVqkeF7kYjaypgZWLBng", + "id": "3d824c7f7c26ed1c85421ecec8c754e6b52d66a4e45de20a9c9ea91de8b396f9", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "LBTC/USD", + "account_address": "HENev4WeM2VhJ2b9tFCQsWdHGU6fTvgW68MsvBeYpxYn", + "id": "8f257aab6e7698bb92b15511915e593d6f8eae914452f781874754b03d0c612b", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "INF/SOL", + "account_address": "4MbCk4vH47K2gHee6nTg62KScpGu2bV3YDeTZtpQm3ro", + "id": "49e50653755fbf8018ab65a07be2f208ac8c4bdfc43200934304ca17ee663cab", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "WTIX5/USD", + "account_address": "2SxsutiRd7TBmURrWW2tPR3xeHpJFuGVGAd4Wjddkk7D", + "id": "2e8c6b85cf4a79b6d8bce10be470eefb369810b642782cb6aa150f82362e65d1", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + }, + { + "alias": "SYRUPUSDC/USDC.RR", + "account_address": "GWdwWDhYFUc8ZD6uCTtEAAwx97V1ZCsxPWGL7vhSha6w", + "id": "2ad31d1c4a85fbf2156ce57fab4104124c5ef76a6386375ecfc8da1ed5ce1486", + "time_difference": 60, + "price_deviation": 0.5, + "confidence_ratio": 100 + } +] diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/evm.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds/evm.mdx new file mode 100644 index 0000000000..b1c54f25a0 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/evm.mdx @@ -0,0 +1,71 @@ +import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import abstractMainnet from "../push-feeds/data/evm/abstract-mainnet.json"; +import arbitrumMainnet from "../push-feeds/data/evm/arbitrum-mainnet.json"; +import avalancheMainnet from "../push-feeds/data/evm/avalanche-mainnet.json"; +import baseMainnet from "../push-feeds/data/evm/base-mainnet.json"; +import berachainMainnet from "../push-feeds/data/evm/berachain-mainnet.json"; +import ethereumMainnet from "../push-feeds/data/evm/ethereum-mainnet.json"; +import hyperevmMainnet from "../push-feeds/data/evm/hyperevm-mainnet.json"; +import soneiumMainnet from "../push-feeds/data/evm/soneium-mainnet.json"; +import sonicMainnet from "../push-feeds/data/evm/sonic-mainnet.json"; +import lineaMainnet from "../push-feeds/data/evm/linea-mainnet.json"; + +# Push Feeds on EVM + +The following EVM chains have push feeds: + +- [Abstract Mainnet](#abstract-mainnet) +- [Arbitrum Mainnet](#arbitrum-mainnet) +- [Avalanche Mainnet](#avalanche-mainnet) +- [Base Mainnet](#base-mainnet) +- [Berachain Mainnet](#berachain-mainnet) +- [Ethereum Mainnet](#ethereum-mainnet) +- [HyperEVM Mainnet](#hyperevm-mainnet) +- [Linea Mainnet](#linea-mainnet) +- [Soneium Mainnet](#soneium-mainnet) +- [Sonic Mainnet](#sonic-mainnet) + + + If you would like to see additional feeds on this list, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + +## Abstract Mainnet + + + +## Arbitrum Mainnet + + + +## Avalanche Mainnet + + + +## Base Mainnet + + + +## Berachain Mainnet + + + +## Ethereum Mainnet + + + +## HyperEVM Mainnet + + + +## Linea Mainnet + + + +## Soneium Mainnet + + + +## Sonic Mainnet + + diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/fogo.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds/fogo.mdx new file mode 100644 index 0000000000..fdfa16f091 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/fogo.mdx @@ -0,0 +1,13 @@ +import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import fogoTestnet from "../push-feeds/data/svm/fogo-testnet.json"; + +# Push Feeds on Fogo + +## Fogo Testnet + + + If you would like to see additional feeds on this list, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + + diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/movement.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds/movement.mdx new file mode 100644 index 0000000000..27c4d95497 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/movement.mdx @@ -0,0 +1,13 @@ +import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import movementMainnet from "../push-feeds/data/movement/movement-mainnet.json"; + +# Push Feeds on Movement + +## Movement Mainnet + + + If you would like to see additional feeds on this list, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + + diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/solana.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds/solana.mdx new file mode 100644 index 0000000000..ad49fd9037 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/solana.mdx @@ -0,0 +1,18 @@ +import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import solanaMainnet from "../push-feeds/data/svm/solana-mainnet.json"; + +# Push Feeds on Solana + + + If you would like to see additional feeds on this list, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + +## Solana Mainnet + + + +Note: The addresses represent the price feed account for shard 0 of the relevant price feed id. diff --git a/apps/developer-hub/content/docs/price-feeds/push-feeds/sui.mdx b/apps/developer-hub/content/docs/price-feeds/push-feeds/sui.mdx new file mode 100644 index 0000000000..97bcc7147a --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/push-feeds/sui.mdx @@ -0,0 +1,13 @@ +import { SponsoredFeedsTable } from "../../../components/SponsoredFeedsTableWithData"; +import suiMainnet from "../push-feeds/data/sui/sui-mainnet.json"; + +# Push Feeds on Sui + + + If you would like to see additional feeds on this list, please fill in this + [form](https://tally.so/r/nGz2jj) to signal your interest. + + +## Sui Mainnet + + diff --git a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference.mdx b/apps/developer-hub/content/docs/price-feeds/pythnet-reference.mdx similarity index 65% rename from apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference.mdx rename to apps/developer-hub/content/docs/price-feeds/pythnet-reference.mdx index d118f65681..1080f87ff0 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference.mdx +++ b/apps/developer-hub/content/docs/price-feeds/pythnet-reference.mdx @@ -1,10 +1,7 @@ --- -title: "Pythnet Reference: Account Structure, Metadata & Schedule Format" -description: >- - Explore Pythnet’s account structure, product metadata, and schedule formats. - Learn best practices to optimize and manage your Pythnet accounts effectively. -full: false -index: false +title: "Pythnet Reference" +description: "Technical reference documentation for Pythnet account structures, product metadata, and schedule formats." +icon: "book" --- # Pythnet Reference diff --git a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/_meta.json b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/_meta.json similarity index 100% rename from apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/_meta.json rename to apps/developer-hub/content/docs/price-feeds/pythnet-reference/_meta.json diff --git a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/account-structure.mdx b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/account-structure.mdx similarity index 95% rename from apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/account-structure.mdx rename to apps/developer-hub/content/docs/price-feeds/pythnet-reference/account-structure.mdx index fc3216b4b1..7a4998d011 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/account-structure.mdx +++ b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/account-structure.mdx @@ -1,10 +1,7 @@ --- -title: Account Structure of PythNet Oracle Accounts -description: >- - Dive into Pyth oracle accounts on Pythnet: understand product and price data - structures, on-chain mappings, real-world examples, and network interactions. -full: false -index: false +title: "Account Structure" +description: "Understand Pyth's on-chain account structure including product accounts, price accounts, and mapping accounts that store pricing data." +icon: "Tree" --- # Account Structure diff --git a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/product-metadata.mdx b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/product-metadata.mdx similarity index 93% rename from apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/product-metadata.mdx rename to apps/developer-hub/content/docs/price-feeds/pythnet-reference/product-metadata.mdx index 4c30bac73a..4ac0ad8057 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/product-metadata.mdx +++ b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/product-metadata.mdx @@ -1,11 +1,7 @@ --- -title: "Product Metadata: Structure & Best Practices for Asset Accounts" -description: >- - Pyth’s product metadata schema covers equities, cryptocurrencies, FX, and - metals. This guide describes the schema’s key attributes and recommended usage - patterns to optimize data processing. -full: false -index: false +title: "Product Metadata" +description: "Learn about the metadata structure for different asset types in Pyth product accounts including equity, crypto, FX, and metals." +icon: "Info" --- # Product Metadata diff --git a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/schedule-format.mdx b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/schedule-format.mdx similarity index 93% rename from apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/schedule-format.mdx rename to apps/developer-hub/content/docs/price-feeds/pythnet-reference/schedule-format.mdx index 471715b5e7..15f9f14978 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/pythnet-reference/schedule-format.mdx +++ b/apps/developer-hub/content/docs/price-feeds/pythnet-reference/schedule-format.mdx @@ -1,10 +1,7 @@ --- -title: "PythNet Schedule Format: Market Hours, Timezones & Holidays" -description: >- - Explore PythNet’s schedule format: discover its structure, components, and - usage with real-world examples for market hours, timezones, and holidays. -full: false -index: false +title: "Schedule Format" +description: "Learn about Pyth's schedule format for defining market hours, timezones, and holiday exceptions for price feeds." +icon: "Calendar" --- # Schedule Format @@ -31,9 +28,9 @@ If `weekly_schedule` is also undefined, pyth-agent will default to 24/7 publishi - `Timezone` - A human-readable tz database TZ identifier of the market’s local timezone, such as `America/New_York`. **Full list of identifiers can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)**. - -
Daylight-saving time is automatically handled by the pyth-agent.
-
+ + Daylight-saving time is automatically handled by the pyth-agent. + - `WeeklySchedule` - A list of seven comma-separated `DaySchedule` entries that define the recurring weekly schedule of a product’s market hours. Each `DaySchedule` entry corresponds to a day of the week, starting from Monday. None of the comma-separated values can be omitted. @@ -70,9 +67,9 @@ If `weekly_schedule` is also undefined, pyth-agent will default to 24/7 publishi ## Weekly Schedule Format (Deprecated) - -
This field is deprecated in favor of `schedule`.
-
+ + This field is deprecated in favor of `schedule`. + This document outlines the rules for specifying contents of a new Pyth product metadata field - `weekly_schedule` . The field specifies the recurring weekly schedule of a product’s market hours. It serves as a reference for `pyth-agent` to stop publishing outside the hours specified in the schedule. Notable use cases include: diff --git a/apps/developer-hub/content/docs/price-feeds/rate-limits.mdx b/apps/developer-hub/content/docs/price-feeds/rate-limits.mdx new file mode 100644 index 0000000000..cd577542d0 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/rate-limits.mdx @@ -0,0 +1,12 @@ +--- +title: "Rate Limits" +description: "Understand the rate limits enforced on Pyth Hermes and Benchmarks APIs to ensure reliable service access." +icon: "clock" +--- + +# Rate Limits + +In order to maximize the reliability of the Pyth Hermes and Benchmarks APIs, a request rate limit is enforced. +All endpoints limits are set at 30 requests every 10 seconds per IP address. + +One exception: the TradingView endpoint will allow 90 requests every 10 seconds. Clients issuing request above the limit will receive a 429 (Too Many Requests) response for the subsequent 60-second period. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates.mdx b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates.mdx similarity index 65% rename from apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates.mdx rename to apps/developer-hub/content/docs/price-feeds/schedule-price-updates.mdx index 153db6efe6..b1ed82fe60 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates.mdx +++ b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates.mdx @@ -1,11 +1,7 @@ --- -title: "Schedule Pyth Price Updates Using Adrastia, Gelato, or Scheduler" -description: >- - Use Adrastia, Gelato, or Scheduler to automate Pyth price updates on EVM - chains. Schedule on-chain price feed updates programmatically to ensure - timely, consistent data. -full: false -index: false +title: "How To Schedule Price Updates" +description: "Learn how to automate Pyth price feed updates using Adrastia, Gelato, or Price Pusher for reliable on-chain price data." +icon: "clock" --- # How To Schedule Price Updates @@ -22,6 +18,12 @@ There are also three different tools to schedule price updates: - [Adrastia's Pyth Price Feed Updater](schedule-price-updates/using-adrastia) is a white-glove service that automates price updates based on time and price deviations, supporting any EVM chain. - [Gelato](schedule-price-updates/using-gelato) provides a turnkey automation solution for scheduled updates. -- [Scheduler](schedule-price-updates/using-scheduler) is a service that developers can run to trigger price updates when certain time or price change conditions are met. +- [Price Pusher](schedule-price-updates/using-price-pusher) is a service that developers can run to trigger price updates when certain time or price change conditions are met. For developers comparing these three options, Adrastia and Gelato are simpler, in that they do not require you to operate a service. + + + Deviation thresholds are fully configurable, limited only by Pythnet’s update + speed. Please be aware: Lower thresholds and more frequent updates increase + on-chain transactions, which raises costs. + diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/_meta.json b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/_meta.json similarity index 62% rename from apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/_meta.json rename to apps/developer-hub/content/docs/price-feeds/schedule-price-updates/_meta.json index cea14c6e3d..30143971e3 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/_meta.json +++ b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/_meta.json @@ -1,5 +1,5 @@ { "using-adrastia": "Using Adrastia", "using-gelato": "Using Gelato", - "using-scheduler": "Using Scheduler" + "using-price-pusher": "Using Price Pusher" } diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-adrastia.mdx b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-adrastia.mdx similarity index 89% rename from apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-adrastia.mdx rename to apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-adrastia.mdx index 5d7e5cda89..b5a0d0ea7c 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-adrastia.mdx +++ b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-adrastia.mdx @@ -1,11 +1,7 @@ --- -title: "Pyth Core: Using Adrastia for Real-Time Price Updates" -description: >- - Adrastia automates secure, real-time access to Pyth price feeds for DeFi - applications. It provides a straightforward integration process, performance - optimizations, and consistently reliable market data. -full: false -index: false +title: "Using Adrastia to Schedule Real-Time Price Updates" +description: "Learn how to use Adrastia's managed service to automatically schedule and push Pyth price updates with reliability and efficiency." +icon: "robot" --- # Using Adrastia to Schedule Real-Time Price Updates diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-gelato.mdx b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-gelato.mdx similarity index 85% rename from apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-gelato.mdx rename to apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-gelato.mdx index 4d1cabc2af..4dd11fecb0 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-gelato.mdx +++ b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-gelato.mdx @@ -1,11 +1,7 @@ --- -title: "Automate Pyth Price Updates with Gelato: Step-by-Step Guide" -description: >- - Gelato automates Pyth price feeds on EVM chains by scheduling off-chain - updates. Configure, deploy, and monitor these updates to keep price data - synchronized. -full: false -index: false +title: "How to Schedule Price Updates with Gelato" +description: "Create automated Gelato tasks to update Pyth price feeds on a schedule with time intervals and price deviation thresholds." +icon: "timer" --- # How to Schedule Price Updates with Gelato @@ -41,7 +37,7 @@ The Gelato task reads a yaml configuration file from a GitHub gist. Create a GitHub gist by logging into GitHub and navigating to [here](https://gist.github.com/). Add a file called `config.yaml`. Copy the [example gist](https://gist.github.com/swimricky/18b2a5ad9c1a605f1cf5c19ac1d2f1d9) and edit the parameters for the environment you're deploying to and configure your price feeds and update thresholds. See -[directory](https://github.com/pyth-network/w3f-pyth-poc-v2/tree/master/web3-functions/pyth-oracle-w3f-priceIds) for +[directory](https://github.com/pyth-network/pyth-gelato-price-pusher) for some example configuration files. These parameters can be updated at any time by editing the gist even if the task has already been deployed. The task will automatically pick up these configuration changes and use them for subsequent executions. @@ -49,13 +45,12 @@ already been deployed. The task will automatically pick up these configuration c Use the link below to auto-populate the task parameters with the Pyth web3 function code: -https://app.gelato.network/new-task?cid=QmTFQHpiThqkVKvuW2KU8cETNBdyXHB9uP34woL6Vc5w6g +https://app.gelato.network/new-task?cid=QmbNPFa3ixUpphUzKJwq3F9bjC9w63FBYQ4iV3s2LpiftN 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/w3f-pyth-poc-v2/tree/master/web3-functions/pyth-oracle-w3f-priceIds) - +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. -![](./assets/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)**. @@ -72,7 +67,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 -![](./assets/guides/gelato/deposit-usdc.png) +![](../../../images/guides/gelato/deposit-usdc.png) **Pyth Fees** @@ -88,7 +83,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. -![](./assets/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. @@ -97,7 +92,7 @@ task. Once your task has been successfully created, you can check the task execution details on the Task dashboard in the Gelato app. -![](./assets/guides/gelato/task-execution.png) +![](../../../images/guides/gelato/task-execution.png) ## Managing your Gelato Task @@ -122,11 +117,11 @@ 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. -![](./assets/guides/gelato/storage-pyth-config.png) +![](../../../images/guides/gelato/storage-pyth-config.png) ## Notes If you want to customize the behavior of the web3 function beyond what is supported by updating the config.yaml, you can -clone this [repo](https://github.com/pyth-network/w3f-pyth-poc-v2) and deploy your own version of the web3 function. -You can then use the cid of your deployed web3 function to create a new task. See [README.md](https://github.com/pyth-network/w3f-pyth-poc-v2/tree/master/web3-functions/pyth-oracle-w3f-priceIds/README.md) and +clone this [repo](https://github.com/pyth-network/pyth-gelato-price-pusher) and deploy your own version of the web3 function. +You can then use the cid of your deployed web3 function to create a new task. See [README.md](https://github.com/pyth-network/pyth-gelato-price-pusher/blob/main/README.md) and [Gelato Web3 Function Documentation](https://docs.gelato.network/web3-services/web3-functions) for more details. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-scheduler.mdx b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-price-pusher.mdx similarity index 59% rename from apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-scheduler.mdx rename to apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-price-pusher.mdx index 795585fe86..90568667c3 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/using-scheduler.mdx +++ b/apps/developer-hub/content/docs/price-feeds/schedule-price-updates/using-price-pusher.mdx @@ -1,16 +1,12 @@ --- -title: "Pyth Scheduler: Schedule Off-Chain Price Updates Guide" -description: >- - Pyth’s off-chain scheduler triggers on-chain price updates when predefined - conditions are met, maintaining reliable blockchain integration and supporting - seamless migration from existing oracles with minimal downtime. -full: false -index: false +title: "Price Pusher" +description: "Run the off-chain Price Pusher application to regularly pull price updates onto blockchain with customizable conditions." +icon: "arrow-circle-up" --- -# Scheduler +# Price Pusher -The [scheduler](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/price_pusher) (previously known as "price pusher") +The [Price Pusher](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/price_pusher) is an off-chain application that regularly pulls price updates on to a blockchain. Anyone can run this service to regularly update the on-chain Pyth price based on various conditions, such as a minimum update frequency, or a price change threshold. This service can simplify the process of migrating to Pyth from other oracles. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot.mdx b/apps/developer-hub/content/docs/price-feeds/troubleshoot.mdx similarity index 58% rename from apps/developer-hub/content/docs/price-feeds/v1/troubleshoot.mdx rename to apps/developer-hub/content/docs/price-feeds/troubleshoot.mdx index 85583bcef8..403c340905 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot.mdx +++ b/apps/developer-hub/content/docs/price-feeds/troubleshoot.mdx @@ -1,10 +1,7 @@ --- -title: Troubleshoot Pyth Price Feed Integration Errors -description: >- - Step-by-step instructions to resolve Pyth price feed issues in EVM and SVM - contracts, enabling data integration in minutes. -full: false -index: false +title: "Troubleshoot" +description: "Troubleshooting guide for common issues when integrating Pyth price feeds in EVM and SVM environments." +icon: "wrench" --- # Troubleshoot diff --git a/apps/developer-hub/content/docs/price-feeds/troubleshoot/_meta.json b/apps/developer-hub/content/docs/price-feeds/troubleshoot/_meta.json new file mode 100644 index 0000000000..882eb29208 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/troubleshoot/_meta.json @@ -0,0 +1,4 @@ +{ + "evm": "EVM", + "svm": "SVM" +} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/evm.mdx b/apps/developer-hub/content/docs/price-feeds/troubleshoot/evm.mdx similarity index 82% rename from apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/evm.mdx rename to apps/developer-hub/content/docs/price-feeds/troubleshoot/evm.mdx index 0302a1e101..c4c994f124 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/evm.mdx +++ b/apps/developer-hub/content/docs/price-feeds/troubleshoot/evm.mdx @@ -1,10 +1,7 @@ --- -title: "Troubleshoot Pyth EVM Price Feed Issues: Fix Common Errors" -description: >- - Troubleshoot Pyth Price Feed on EVM chains with our concise guide and official - resources. Quickly fix stale prices, wrong feed IDs, and low-fee errors. -full: true -index: false +title: "Troubleshoot EVM Price Feeds Contract" +description: "Diagnose and resolve common issues when using Pyth Price Feeds on EVM chains, including stale prices and insufficient fees." +icon: "wrench" --- # Troubleshoot EVM Price Feeds Contract @@ -33,7 +30,7 @@ To resolve this issue: - Update the prices by calling [`updatePriceFeeds()`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds) by passing the latest updateData from [Hermes](https://hermes.pyth.network/docs/#/rest/latest_vaas). -- Check the entered [price feed id](https://pyth.network/developers/price-feed-ids) and [pyth-contract address](https://docs.pyth.network/price-feeds/contract-addresses/evm) to make sure they are correct. +- Check the entered [price feed id](../price-feeds.mdx) and [pyth-contract address](https://docs.pyth.network/price-feeds/contract-addresses/evm) to make sure they are correct. #### updatePriceFeeds() reverts with `InsufficientFee()` or `0x025dbdd4` error diff --git a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/svm.mdx b/apps/developer-hub/content/docs/price-feeds/troubleshoot/svm.mdx similarity index 84% rename from apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/svm.mdx rename to apps/developer-hub/content/docs/price-feeds/troubleshoot/svm.mdx index 818033c135..c54a0d7b29 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/svm.mdx +++ b/apps/developer-hub/content/docs/price-feeds/troubleshoot/svm.mdx @@ -1,10 +1,7 @@ --- -title: "Troubleshoot SVM Price Feeds: Fix Anchor-Lang Version Mismatch" -description: >- - Step-by-step guide to align anchor-lang versions in Cargo.toml and Cargo.lock - to resolve Pyth SVM compilation errors affecting Solana price feeds. -full: false -index: false +title: "Troubleshoot Solana Price Feeds Contract" +description: "Resolve common compilation and integration issues when using Pyth Price Feeds on SVM chains, including anchor-lang version conflicts." +icon: "wrench" --- # Troubleshoot Solana Price Feeds Contract diff --git a/apps/developer-hub/content/docs/price-feeds/use-historic-price-data.mdx b/apps/developer-hub/content/docs/price-feeds/use-historic-price-data.mdx new file mode 100644 index 0000000000..16ab0639fd --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-historic-price-data.mdx @@ -0,0 +1,117 @@ +--- +title: "Use Historic Price Data (Benchmarks)" +description: "Access historical price data using Pyth Benchmarks API for contract settlement, backtesting, and analytics." +icon: "chart-line" +--- + +import { Steps } from "nextra/components"; + +# Use Historic Price Data (Benchmarks) + +This guide shows you how to integrate **Pyth Benchmarks to access historical price data** for your applications. +The Pyth Benchmarks API is available on all Pythnet chains. + + + This guide uses the term **Benchmarks** to refer to the historical price data + service. + + +## Overview + +Pyth Benchmarks allows you to query historical prices at specific points in time. This is useful for: + +- **Contract Settlement**: Use historical prices for options, futures, or other derivative settlements. +- **Backtesting**: Test trading strategies with historical market data. +- **Audit & Compliance**: Verify past prices for regulatory requirements. +- **Analytics**: Analyze price movements and market behavior over time. + +Pyth Benchmarks can be used in two ways to fetch historical prices: + +1. Fetching historical prices from Benchmarks API +2. Verifying historical prices on-chain + + + +### 1. Fetching Historical Prices from Benchmarks API + +Fetching historical prices from the [Benchmarks API](https://benchmarks.pyth.network/docs#/Updates/price_updates_timestamp_route_v1_updates_price__timestamp__get) is the most straightforward way to get historical prices. +Moreover, [Hermes also extends the Benchmarks API to allow you to fetch historical prices](https://hermes.pyth.network/docs/#/rest/timestamp_price_updates). + +Benchmarks APIs expose two endpoints to fetch historical prices: + +- [`/v1/updates/price/{timestamp}`](https://benchmarks.pyth.network/docs#/): Returns the price for all price feeds passed as query parameters at a given time. +- [`/v1/updates/price/{timestamp}/{interval}`](https://benchmarks.pyth.network/docs#/): Returns the price for the price feed passed as query parameter at a given time and with the specified interval. + + + +Time interval in seconds added to the provided timestamp for the requested price updates. +For example, if the timestamp is 1716400000 and the **interval is 60,** this function will return price updates from time 1716400000 to 1716400060, inclusive of both. **The time interval should not exceed 60 seconds.** + + + +### 2. Verifying Historical Prices on EVM Chains + +Verifying Historical Prices on-chain is very similar to verifying real-time prices on-chain. +After fetching the price updates in the previous step, you need to pass the price update to the [`parsePriceFeedUpdates`](https://api-reference.pyth.network/price-feeds/evm/parsePriceFeedUpdates) function on the Pyth contract instead of the [`updatePriceFeeds`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds) function. + +```solidity copy +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@pythnetwork/pyth-sdk-solidity/IPyth.sol"; +import "@pythnetwork/pyth-sdk-solidity/PythStructs.sol"; + +contract HistoricalPriceConsumer { + IPyth public pyth; + + constructor(address _pyth) { + pyth = IPyth(_pyth); + } + + function settleWithHistoricalPrice( + bytes[] calldata priceUpdate, + uint256 priceId, + uint256 minPublishTime, + uint256 maxPublishTime, + ) external { + // The parsePriceFeedUpdates function requires a fee to be paid. + // The fee is the same as the fee for the updatePriceFeeds function. + uint fee = pyth.getUpdateFee(priceUpdate); + PythStructs.Price memory price = pyth.parsePriceFeedUpdates{value: fee}( + priceUpdate, + priceId, + minPublishTime, + maxPublishTime, + ); + + // Use the historical price for settlement + uint256 settlementPrice = uint256(price.price); + // ... settlement logic + } +} +``` + +The code snippet above does the following things differently from the [verifying real-time prices on-chain](./use-real-time-data.mdx): + +- It calls the `parsePriceFeedUpdates` function instead of the `updatePriceFeeds` function. +- It passes the price id to the `parsePriceFeedUpdates` function as well. The price feed id is needed to identify if the price update belongs to the price feed. +- It passes the **min publish time** and **max publish time** to the `parsePriceFeedUpdates` function. The min publish time and max publish time are the time range of the price update. If the price update is not within the time range, the function will revert with `PriceFeedNotFoundWithinRange`. + +Refer to the [parsePriceFeedUpdates](https://api-reference.pyth.network/price-feeds/evm/parsePriceFeedUpdates) function for more details. + + + +## Additional Resources + +### API Reference + +- [Benchmark API Documentation](https://benchmarks.pyth.network/docs) +- Explore the [Pyth on-chain API documentation](https://api-reference.pyth.network/price-feeds/evm/parsePriceFeedUpdates) to learn more about parsing price updates on EVM chains. + +### TradingView Integration + +- [TradingView integration](./create-tradingview-charts) for visualization. + +### Rate Limits + +- Benchmarks API has the same rate limits as the [Hermes API](./rate-limits). diff --git a/apps/developer-hub/content/docs/price-feeds/use-pyth-for-morpho.mdx b/apps/developer-hub/content/docs/price-feeds/use-pyth-for-morpho.mdx new file mode 100644 index 0000000000..3a058f1fea --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-pyth-for-morpho.mdx @@ -0,0 +1,67 @@ +--- +title: "How to use Pyth for Morpho Markets" +description: "Learn how to integrate Pyth real-time price data with Morpho markets using the pyth-morpho-wrapper and oracle contracts." +icon: "chart-line-up" +--- + +import { Steps } from "nextra/components"; + +# How to use Pyth for Morpho Markets + +This guide will show how you can leverage Pyth real-time price data to power Morpho markets. + +Pyth provides a wrapper which implements Morpho's `IOracle` interface called [`pyth-morpho-wrapper`](https://github.com/pyth-network/pyth-morpho-wrapper). + +There are two steps to use Pyth price feeds for Morpho markets: + +1. Schedule Price Updates. +2. Deploy the [`MorphoPythOracle.sol`](https://github.com/pyth-network/pyth-morpho-wrapper/blob/main/src/morpho-pyth/MorphoPythOracle.sol) contract for the respective price feed pair. + + + +### Schedule Price Updates + +As a pull oracle, Pyth's users are typically responsible for updating the state of on-chain feeds. +Please see [What is a Pull Oracle?](/price-feeds/pull-updates) to learn more about pull updates. + +Consult [Schedule Price Updates](/price-feeds/schedule-price-updates) guide for more information. + +The Pyth Data Association sponsors regular on-chain updates for some price feeds. +See [Sponsored Feeds](./sponsored-feeds.mdx) for the current list of feeds and their update parameters. + +If you don't find relevant price IDs in the [Sponsored Feeds](./sponsored-feeds.mdx) list, please contact the Pyth team [here](https://tally.so/r/nGz2jj) to run the Price Pusher for the price feed you need. + +### Deploy the Morpho oracle contract + +After running the [Price Pusher](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/price_pusher), you can deploy the Morpho oracle contract using the MorphoPythOracle.sol contract. + +To deploy a MorphoPythOracle on an EVM chain, we highly recommend using the factory MorphoPythOracleFactory. Please refer to the factory addresses [here](https://github.com/pyth-network/pyth-morpho-wrapper?tab=readme-ov-file#factory-addresses). + +If you don't see the factory address for your chain, you can deploy your own factory by using the [`scripts/MorphoPythOracleFactoryDeploy.s.sol`](https://github.com/pyth-network/pyth-morpho-wrapper/blob/main/scripts/MorphoPythOracleFactoryDeploy.s.sol) script or by creating an issue on [this repository](https://github.com/pyth-network/pyth-morpho-wrapper). +If you are deploying, please make sure to update the README.md file with the new factory address. + +To do so, run the [`MorphoPythOracleDeploy.s.sol`](https://github.com/pyth-network/pyth-morpho-wrapper/blob/main/scripts/MorphoPythOracleDeploy.s.sol) script with the following environment variables set: + +- `PYTH_ADDRESS`: The Pyth contract address. This is the address of the Pyth contract deployed on the chain. You can find the address of the Pyth contract for each chain [here](./contract-addresses/evm.md). +- `BASE_VAULT`: The ERC4626 token vault for the base asset. +- `BASE_VAULT_CONVERSION_SAMPLE`: A sample amount for converting base vault units. +- `BASE_FEED1`, `BASE_FEED2`: Pyth price feed ids for the base asset. You can find the price feed ids for each asset in our [price feeds directory](./price-feeds.mdx). +- `BASE_TOKEN_DECIMALS`: Decimal precision of the base asset. +- `QUOTE_VAULT`: The ERC4626 token vault for the quote asset. +- `QUOTE_VAULT_CONVERSION_SAMPLE`: A sample amount for converting quote vault units. +- `QUOTE_FEED1`, `QUOTE_FEED2`: Pyth price feed ids for the quote asset. You can find the price feed ids for each asset in our [price feeds directory](./price-feeds.mdx). +- `QUOTE_TOKEN_DECIMALS`: Decimal precision of the quote asset. +- `PRICE_FEED_MAX_AGE`: The maximum age of the price feed in seconds. Note: This adds an extra safety net to avoid using stale prices. +- `SALT`: A unique identifier to create deterministic addresses for deployed oracles. + +Check more information about these immutable parameters [here](https://docs.morpho.org/getting-started/resources/contracts/oracles/#immutables) and some assumptions to take into account [here](https://docs.morpho.org/getting-started/resources/contracts/oracles/#assumptions). + + + If there is an ERC4626-compliant vault for `BASE_VAULT` or `QUOTE_VAULT`, the + `BASE_TOKEN_DECIMALS` or `QUOTE_TOKEN_DECIMALS` are still the decimals of the + underlying asset of the vault, and not the decimals of the Vault itself. E.g: + for a MetaMorpho WETH vault, as `BASE_VAULT`, the `BASE_TOKEN_DECIMALS` is 18 + as WETH has 18 decimals. + + + diff --git a/apps/developer-hub/content/docs/price-feeds/use-real-time-data.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data.mdx new file mode 100644 index 0000000000..97d8291892 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data.mdx @@ -0,0 +1,60 @@ +--- +title: How to Use Real-Time Price Data +description: Guides for consuming Pyth real-time prices across 100+ blockchain ecosystems +icon: Lightning +--- + +# How to Use Real-Time Price Data + +The following guides demonstrate how to consume Pyth real-time prices on various blockchains. +These guides are intended for developers building on-chain applications that need the latest price data, i.e., the price data must +be on the blockchain. + +Pyth price feeds are available on 100+ blockchain ecosystems. +Check out the complete list of chains and implementation contract addresses at [Contract Addresses](contract-addresses). +If your blockchain is not supported, please [ask in the dev-forum](https://dev-forum.pyth.network/latest). + +## Choosing Your Integration Method + +**Pull integration** is the default choice for most applications. In this integration, the application retrieves price data from a [webservice](./how-pyth-works/hermes) and submits it to +an on-chain smart contact as part of the transaction. This integration provides the lowest-latency access to Pyth price data. + +**Push integration** is for applications that don't want to pull prices in every transaction and prefer a purely on-chain integration. + + + All feeds are available through both integration methods. However, for the to + use push integration, the application needs to submit the prices to the + on-chain smart contract as part of the transaction. Check out the [Push + Integration](use-real-time-data/push-integration) guide to get started. + + +## Pull Integration + +Consult the relevant ecosystem guide to get started using **pull integration**: + +- [EVM](use-real-time-data/pull-integration/evm) +- [Solana](use-real-time-data/pull-integration/solana) +- [Starknet](use-real-time-data/pull-integration/starknet) +- [Aptos](use-real-time-data/pull-integration/aptos.md) +- [CosmWasm](use-real-time-data/pull-integration/cosmwasm.md) +- [Sui](use-real-time-data/pull-integration/sui.md) +- [IOTA](use-real-time-data/pull-integration/iota.md) +- [Near](use-real-time-data/pull-integration/near.md) + +## Push Integration + +To consume real-time price data using **push** integration, check out the following guides: + +- [Using Push Integration](use-real-time-data/push-integration) + +This guide will walk you through the steps to use real-time price data using push integration in every ecosystem. + +## Off-Chain Applications + +Pyth price feeds can also be used in off-chain applications. +For example, an application may need to show real-time asset prices on a website. +Developers building such applications can consult the following guide: + +- [Off-chain Apps](use-real-time-data/off-chain.md) + +To fetch historical prices, application developers can check out the [Use Historic Price Data](use-historic-price-data) guide. diff --git a/apps/developer-hub/content/docs/price-feeds/use-real-time-data/_meta.json b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/_meta.json new file mode 100644 index 0000000000..f5f4e69e87 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/_meta.json @@ -0,0 +1,4 @@ +{ + "pull-integration": "Pull Integration", + "push-integration": "Push Integration" +} diff --git a/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/_meta.json b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/_meta.json new file mode 100644 index 0000000000..524f69fbf4 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/_meta.json @@ -0,0 +1,13 @@ +{ + "evm": "EVM", + "solana": "Solana", + "aptos": "Aptos", + "sui": "Sui", + "starknet": "Starknet", + "cosmwasm": "CosmWasm", + "near": "NEAR", + "fuel": "Fuel", + "iota": "IOTA", + "ton": "TON", + "stacks": "Stacks" +} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/aptos.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/aptos.mdx similarity index 75% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/aptos.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/aptos.mdx index f2e55341a0..6750b9784f 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/aptos.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/aptos.mdx @@ -1,10 +1,7 @@ --- -title: Using Real-Time Pyth Data in Aptos Contracts -description: >- - Integrate real-time Pyth price feeds into Aptos smart contracts. Step-by-step - setup, code samples, and BTC/USD data resources included. -full: false -index: false +title: "Aptos Pull Integration" +description: "Consume Pyth Network prices in Aptos applications using Move smart contracts" +icon: "Coins" --- # How to Use Real-Time Data in Aptos Contracts @@ -52,7 +49,7 @@ module example::example { // Read the current price from a price feed. // Each price feed (e.g., BTC/USD) is identified by a price feed ID. - // The complete list of feed IDs is available at https://pyth.network/developers/price-feed-ids + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds // Note: Aptos uses the Pyth price feed ID without the `0x` prefix. let btc_price_identifier = x"e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"; let btc_usd_price_id = price_identifier::from_byte_vec(btc_price_identifier); @@ -62,33 +59,25 @@ module example::example { ``` - -
- The `pyth_price_update` argument contains verified prices from Pyth. Calling - `pyth::update_price_feeds` with this value updates the on-chain Pyth price - and ensures your application has recent price data. The pyth_price_update - can be fetched from Hermes; Consult [Fetch Price - Updates](../fetch-price-updates) for more information on how to fetch the - `pyth_price_update`. -
-
+ + The `pyth_price_update` argument contains verified prices from Pyth. Calling + `pyth::update_price_feeds` with this value updates the on-chain Pyth price and + ensures your application has recent price data. The pyth_price_update can be + fetched from Hermes; Consult [Fetch Price Updates](../fetch-price-updates) for + more information on how to fetch the `pyth_price_update`. + The code snippet above does the following things: 1. Call `pyth::get_update_fee` to get the fee required to update the Pyth price feeds. 1. Call `pyth::update_price_feeds` and pass `pyth_price_update` to update the Pyth price feeds. -1. Call `pyth::get_price` to read the current price, providing the [price feed ID](https://pyth.network/developers/price-feed-ids) you wish to read. +1. Call `pyth::get_price` to read the current price, providing the [price feed ID](../price-feeds.mdx) you wish to read. ## Additional Resources You may find these additional resources helpful for developing your Aptos application. -### API Reference - -The [Aptos API reference](../api-reference/aptos/) lets you interactively explore the complete API of the Pyth contract. - ### Example Applications - [Minimal on-chain contract](https://github.com/pyth-network/pyth-examples/blob/main/price_feeds/aptos/fetch_btc_price/sources/example.move), which updates and returns the BTC/USD price from Pyth price feeds. - [Mint NFT](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/aptos/mint_nft) that use Pyth price feeds to mint an NFT. - th price feeds to mint an NFT. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/cosmwasm.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/cosmwasm.mdx similarity index 70% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/cosmwasm.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/cosmwasm.mdx index 2bbdcb4beb..445b6a933d 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/cosmwasm.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/cosmwasm.mdx @@ -1,22 +1,17 @@ --- -title: "CosmWasm & Pyth Network: Integrating Real-Time Price Feeds" -description: >- - Add real-time market data to your CosmWasm smart contracts with Pyth Network - price feeds. Follow our step-by-step setup, update guidance, and resource - library for seamless integration. -full: false -index: false +title: "CosmWasm Integration" +description: "Consume Pyth Network prices in applications on CosmWasm" +icon: "Atom" --- # Pyth on Cosmwasm Cosmwasm contracts can update and fetch the Pyth prices using the Pyth Cosmwasm Contract, deployed on their network. The documented source code can be found [here](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/cosmwasm/contracts/pyth). -The [Cosmwasm API reference](../../cosmwasm) lets you interactively explore the complete API of the Pyth contract. ## Update Price Feeds -The mechanism by which price feeds are updated on Cosmwasm is explained [here](../pythnet-price-feeds/pull-updates.mdx). The [@pythnetwork/price-service-client](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/client/js) typescript package can be used to fetch the latest price feed data which then can be passed to the contract as the [UpdatePriceFeeds](../api-reference/cosmwasm/execute-update-price-feeds) ExecuteMsg. +The mechanism by which price feeds are updated on Cosmwasm is explained [here](../pythnet-price-feeds/pull-updates.mdx). The [@pythnetwork/price-service-client](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/client/js) typescript package can be used to fetch the latest price feed data which then can be passed to the contract as the `UpdatePriceFeeds` ExecuteMsg. Pyth publishes prices for two kinds of feeds: @@ -29,10 +24,7 @@ Pyth publishes prices for two kinds of feeds: ## Price Feed IDs -The price feed IDs for stable and edge feeds are different and can be found here. - -- [List of stable ids](https://pyth.network/developers/price-feed-ids#cosmwasm-stable) -- [List of beta ids](https://pyth.network/developers/price-feed-ids#cosmwasm-edge) +The price feed IDs for stable and edge feeds are different and can be found at https://docs.pyth.network/price-feeds/price-feeds. ## Contract Addresses diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/evm.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/evm.mdx similarity index 71% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/evm.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/evm.mdx index 8fbac64076..2ec62844f7 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/evm.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/evm.mdx @@ -1,16 +1,25 @@ --- -title: Integrate Real-Time Pyth Data into EVM Contracts -description: >- - This guide explains how to integrate Pyth Network’s real-time price feeds into - EVM smart contracts. It covers SDK installation and configuration, and - provides code examples for retrieving and using on-chain price data. -full: false -index: false +title: "EVM Pull Integration" +description: "Integrate Pyth Network real-time price data in EVM-based smart contracts using pull oracle pattern" +icon: "Cube" --- # How to Use Real-Time Data in EVM Contracts -This guide explains how to use real-time Pyth data in EVM contracts. For an interactive playground to explore the methods supported by the Pyth contract, see the [EVM API reference](../api-reference/evm/). +This guide explains how to use real-time Pyth data in EVM contracts using the pull integration. + +For an interactive playground to explore the methods supported by the Pyth contract, see the [EVM API reference](../../api-reference). + + + If you want to use real-time price data using the push integration instead, you can use the following code snippet: + ```solidity copy + PythStructs.Price memory price = pyth.getPriceNoOlderThan(priceFeedId, 60); + ``` +Developers only need to pass the price feed ID to the above method from the [Push Feeds list](../../push-feeds/evm). + +For complete example, refer to the [Push Integration guide](../push-integration). + + ## Install Pyth SDK @@ -80,7 +89,7 @@ contract SomeContract { // Read the current price from a price feed if it is less than 60 seconds old. // Each price feed (e.g., ETH/USD) is identified by a price feed ID. - // The complete list of feed IDs is available at https://pyth.network/developers/price-feed-ids + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds bytes32 priceFeedId = 0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace; // ETH/USD PythStructs.Price memory price = pyth.getPriceNoOlderThan(priceFeedId, 60); } @@ -90,11 +99,11 @@ contract SomeContract { The code snippet above does the following things: -1. Instantiate the `IPyth` interface from the Solidity SDK using the price feeds [contract address](../contract-addresses/evm). -2. Select the [Price Feed IDs](https://pyth.network/developers/price-feed-ids) for the assets you want to fetch prices for. Price feeds come in two varieties, Stable and Beta. You should select Stable feed ids +1. Instantiate the `IPyth` interface from the Solidity SDK using the price feeds [contract address](../../contract-addresses/evm). +2. Select the [Price Feed IDs](../../price-feeds) for the assets you want to fetch prices for. Price feeds come in two varieties, Stable and Beta. You should select Stable feed ids 3. Call `IPyth.getUpdateFee` to calculate the fee charged by Pyth to update the price. 4. Call `IPyth.updatePriceFeeds` to update the price, paying the fee calculated in the previous step. -5. Call `IPyth.getPriceNoOlderThan` to read the current price, providing the [price feed ID](https://pyth.network/developers/price-feed-ids) that you wish to read and your acceptable staleness threshold for +5. Call `IPyth.getPriceNoOlderThan` to read the current price, providing the [price feed ID](../../price-feeds) that you wish to read and your acceptable staleness threshold for the price. ## Additional Resources @@ -103,15 +112,15 @@ You may find these additional resources helpful for developing your EVM applicat ### API Reference -The [EVM API reference](../api-reference/evm/) lets you interactively explore the complete API of the Pyth contract. +The [EVM API reference](../../api-reference) lets you interactively explore the complete API of the Pyth contract. ### Current Fees -The [Current Fees](../current-fees/) page lists the current fees for each network. +The [Current Fees](../../current-fees) page lists the current fees for each network. ### Error Codes -The [EVM error codes](../error-codes/evm/) page lists the error codes that the Pyth contract may return. +The [EVM error codes](../../error-codes/evm) page lists the error codes that the Pyth contract may return. ### Example Applications diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/fuel.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/fuel.mdx similarity index 90% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/fuel.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/fuel.mdx index 0082297bad..ba357df275 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/fuel.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/fuel.mdx @@ -1,13 +1,11 @@ --- -title: "Fuel Contracts: Integrate Real-Time Pyth Data" -description: >- - Use Fuel SDKs, code samples, and documentation to integrate Pyth Network - real-time price feeds into your contracts and retrieve accurate, up-to-date - data. -full: false -index: false +title: "Fuel Integration" +description: "Consume Pyth Network prices in Fuel applications using smart contracts" +icon: "Fire" --- +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + # How to Use Real-Time Data in Fuel Contracts This guide explains how to use real-time Pyth data in Fuel contracts. @@ -23,16 +21,16 @@ pyth_interface = { git = "https://github.com/pyth-network/pyth-crosschain", tag Pyth also provides a javascript SDK to interact with the Pyth contract on Fuel. You can install it using the following command: - - ``` npm install --save @pythnetwork/pyth-fuel-js ``` - ``` yarn add @pythnetwork/pyth-fuel-js ``` + + ```npm install --save @pythnetwork/pyth-fuel-js ``` + ```yarn add @pythnetwork/pyth-fuel-js ``` ## Write Contract Code The code snippet below provides an example module fetching the ETH/USD price from Pyth price feeds: -```rust copy +```sway copy contract; use pyth_interface::{data_structures::price::{Price, PriceFeedId}, PythCore}; @@ -89,13 +87,11 @@ The `update_data` argument contains verified prices from Pyth. Calling `pyth_contract.update_price_feeds` with this value updates the on-chain Pyth price and ensures your application has recent price data. The `update_data` can be fetched from Hermes; Consult [Fetch Price Updates](https://docs.pyth.network/price-feeds/fetch-price-updates) for more information on how to fetch the `update_data`. - -
- Regarding the Pyth contract on Fuel, the caller must pay the fee in the base - asset for functions like `update_price_feeds`. The fee is currently set to - the minimum possible value (1 wei). -
-
+ + Regarding the Pyth contract on Fuel, the caller must pay the fee in the base + asset for functions like `update_price_feeds`. The fee is currently set to the + minimum possible value (1 wei). + The code snippet above does the following things: diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/iota.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/iota.mdx similarity index 75% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/iota.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/iota.mdx index bb67a44228..e1bd2f9ea5 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/iota.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/iota.mdx @@ -1,12 +1,11 @@ --- -title: Integrating Real-Time Pyth Data into IOTA Contracts -description: >- - This SDK includes code samples and best practices for integrating live Pyth - price feeds into IOTA smart contracts. -full: false -index: false +title: "IOTA Integration" +description: "Consume Pyth Network prices in IOTA applications using smart contracts" +icon: "Circle" --- +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + # How to Use Real-Time Data in IOTA Contracts This guide explains how to use real-time Pyth data in IOTA applications. @@ -15,8 +14,8 @@ This guide explains how to use real-time Pyth data in IOTA applications. Use the following dependency in your `Move.toml` file to use the latest Pyth IOTA package and its dependencies: - - + + ```sh copy [dependencies.Pyth] @@ -36,7 +35,7 @@ rev = "751c23caf24efd071463b9ffd07eabcb15f44f31" ``` - + ```sh copy [dependencies.Pyth] @@ -61,7 +60,7 @@ rev = "751c23caf24efd071463b9ffd07eabcb15f44f31" Pyth also provides a javascript SDK to construct transaction blocks that update price feeds: - + ```sh # NPM npm install --save @pythnetwork/pyth-iota-js @@ -102,7 +101,7 @@ module pyth_example::main { let price_id = price_identifier::get_bytes(&price_info::get_price_identifier(&price_info)); // ETH/USD price feed ID - // The complete list of feed IDs is available at https://pyth.network/developers/price-feed-ids + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds // Note: IOTA uses the Pyth price feed ID without the `0x` prefix. assert!(price_id!=x"ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", E_INVALID_ID); @@ -126,7 +125,7 @@ import { Transaction } from "@iota/iota-sdk/transactions"; const connection = new IotaPriceServiceConnection("https://hermes-beta.pyth.network"); const priceIDs = [ - // You can find the IDs of prices at https://pyth.network/developers/price-feed-ids + // You can find the IDs of prices at https://docs.pyth.network/price-feeds/price-feeds "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", // BTC/USD price ID "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", // ETH/USD price ID ]; @@ -167,44 +166,19 @@ const result = await wallet.signAndExecuteTransaction(txBlock); By calling the `updatePriceFeeds` function, the `IotaPythClient` adds the necessary transactions to the transaction block to update the price feeds. - - -
- Your IOTA Move module **should NOT** have a hard-coded call to - `pyth::update_single_price_feed.` In other words, a contract should **never - call** the IOTA Pyth `pyth::update_single_price_feed` entry point. Instead, it - should be called directly from client code (e.g., Typescript or Rust). -
- -
- When IOTA contracts are - [upgraded](https://docs.iota.org/developer/iota-101/move-overview/package-upgrades/introduction), - the address changes, which makes the old address no longer valid. If your - module has a hard-coded call to `pyth::update_single_price_feed` living at a - fixed call-site, it may eventually get bricked due to how Pyth upgrades are - implemented. (Pyth only allow users to interact with the most recent package - version for security reasons). -
- -
- Therefore, you should build a [IOTA programmable - transaction](https://docs.iota.org/developer/iota-101/transactions/ptb/programmable-transaction-blocks-overview) - that first updates the price by calling `pyth::update_single_price_feed` at - the latest call-site from the client-side and then call a function in your - contract that invokes `pyth::get_price` on the `PriceInfoObject` to get the - recently updated price. -
-
- You can use `IOTAPythClient` to build such transactions and handle all the - complexity of updating the price feeds. -
- -
- Consult [Fetch Price Updates](../fetch-price-updates) for more information on - how to fetch the `pyth_price_update`. -
- -
+ + +Your IOTA Move module **should NOT** have a hard-coded call to `pyth::update_single_price_feed.` In other words, a contract should **never call** the IOTA Pyth `pyth::update_single_price_feed` entry point. Instead, it should be called directly from client code (e.g., Typescript or Rust). + +When IOTA contracts are [upgraded](https://docs.iota.org/developer/iota-101/move-overview/package-upgrades/introduction), the address changes, which makes the old address no longer valid. If your module has a hard-coded call to `pyth::update_single_price_feed` living at a fixed call-site, it may eventually get bricked due to how Pyth upgrades are implemented. (Pyth only allow users to interact with the most recent package version for security reasons). + +Therefore, you should build a [IOTA programmable transaction](https://docs.iota.org/developer/iota-101/transactions/ptb/programmable-transaction-blocks-overview) that first updates the price by calling `pyth::update_single_price_feed` at the latest call-site from the client-side and then call a function in your contract that invokes `pyth::get_price` on the `PriceInfoObject` to get the recently updated price. +You can use `IOTAPythClient` to build such transactions and handle all the complexity of updating the price feeds. + +Consult [Fetch Price Updates](../fetch-price-updates) for more information on how to fetch the `pyth_price_update`. + + + ## Additional Resources You may find these additional resources helpful for developing your IOTA application. @@ -233,4 +207,4 @@ Consult [IOTA Contract Addresses](../contract-addresses/iota) to find the packag ### Pyth Price Feed IDs -Consult [Pyth Price Feed IDs](https://pyth.network/developers/price-feed-ids) to find Pyth price feed IDs for various assets. +Consult [Pyth Price Feed IDs](../price-feeds.mdx) to find Pyth price feed IDs for various assets. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/near.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/near.mdx similarity index 91% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/near.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/near.mdx index 369b254789..a2d78f5eb7 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/near.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/near.mdx @@ -1,10 +1,7 @@ --- -title: "Pyth on NEAR: Integrating Price Feeds & Real-Time Data" -description: >- - Integrate Pyth price feeds on NEAR with our step-by-step guide. Learn to use - the Pyth API, fetch off-chain data, and update on-chain seamlessly. -full: false -index: false +title: "NEAR Integration" +description: "Consume Pyth Network prices in NEAR applications using smart contracts" +icon: "Cloud" --- # Pyth on NEAR @@ -45,10 +42,10 @@ To get started with Pyth oracle you will need to gather the following informatio - HermesAPI Endpoint - Smart contract address -| Network | Price Feed IDs | Hermes API Address | Contract Address | -| --------- | ------------------------------------------------------------------------------------------------ | -------------------------- | -------------------------------------------------------------------------------- | -| `testnet` | [NEAR `testnet` Price Feed IDs](https://www.pyth.network/developers/price-feed-ids#near-testnet) | `hermes-beta.pyth.network` | [pyth-oracle.testnet](https://testnet.nearblocks.io/address/pyth-oracle.testnet) | -| `mainnet` | [NEAR `mainnet` Price Feed IDs](https://www.pyth.network/developers/price-feed-ids#near-mainnet) | `hermes.pyth.network` | [pyth-oracle.near](https://nearblocks.io/address/pyth-oracle.near) | +| Network | Price Feed IDs | Hermes API Address | Contract Address | +| --------- | --------------------------------------------------- | -------------------------- | -------------------------------------------------------------------------------- | +| `testnet` | [NEAR `testnet` Price Feed IDs](../price-feeds.mdx) | `hermes-beta.pyth.network` | [pyth-oracle.testnet](https://testnet.nearblocks.io/address/pyth-oracle.testnet) | +| `mainnet` | [NEAR `mainnet` Price Feed IDs](../price-feeds.mdx) | `hermes.pyth.network` | [pyth-oracle.near](https://nearblocks.io/address/pyth-oracle.near) | Note: When using Price Feed IDs, you will need to remove the `0x` prefix. @@ -221,7 +218,7 @@ const receiver = "pyth-oracle.testnet"; const network = "testnet"; const PRICE_IDS = [ - // Price ids can be found at https://www.pyth.network/developers/price-feed-ids#near-testnet + // Price ids can be found at https://docs.pyth.network/price-feeds/price-feeds // NOTE: Ensure you are using NEAR specific price ids & remove the '0x' prefix before using them "f9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b", // BTC/USD price id "ca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6", // ETH/USD price id @@ -301,7 +298,7 @@ Create a `get-price.js` file that will perform the view call from the Pyth Oracl const { getTestnetRpcProvider, view } = require("@near-js/client"); const PRICE_IDS = [ - // Price ids can be found at https://www.pyth.network/developers/price-feed-ids#near-testnet + // Price ids can be found at https://docs.pyth.network/price-feeds/price-feeds // NOTE: Ensure you are using NEAR specific price ids & remove the '0x' prefix before using them "f9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b", // BTC/USD price id "ca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6", // ETH/USD price id diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/solana.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/solana.mdx similarity index 87% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/solana.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/solana.mdx index 4b6e15fc27..f8d5bff798 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/solana.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/solana.mdx @@ -1,11 +1,7 @@ --- -title: Using Pyth Network for Real-Time Data in Solana & SVM Programs -description: >- - Fetch real-time Pyth price feeds in Solana programs: configure the SDK, read - on-chain data, integrate with your frontend, and use TWAP for reliable - pricing. -full: false -index: false +title: "Solana Pull Integration" +description: "Consume Pyth Network prices in Solana applications using price update accounts and price feed accounts" +icon: "Lightning" --- # How to Use Real-Time Data in Solana Programs @@ -26,10 +22,10 @@ Add this crate to the dependencies section of your `Cargo.toml` file: pyth-solana-receiver-sdk ="x.y.z" # get the latest version from https://crates.io/crates/pyth-solana-receiver-sdk ``` - -
At the time of writing, [pyth-solana-receiver-sdk](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/solana/pyth_solana_receiver_sdk) is compatible with Anchor `v0.28.0{:js}`, `v0.29.0{:js}`, and `v0.30.1{:js}`. -If you are on `v0.30.0{:js}` or any other version, please move to `v0.30.1{:js}`.
-
+ +At the time of writing, [pyth-solana-receiver-sdk](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/solana/pyth_solana_receiver_sdk) is compatible with Anchor `v0.28.0{:js}`, `v0.29.0{:js}`, `v0.30.1{:js}` and `v0.31.1{:js}`. +If you are on any other version, please move to `v0.31.1{:js}`. This [repository](https://github.com/guibescos/anchor-pyth/tree/main/programs/anchor-pyth) has a branch for each of these versions containing a minimal working Solana program. + ### Typescript SDK @@ -59,11 +55,11 @@ pub struct Sample<'info> { } ``` - -
Users must ensure that the account passed to their instruction is owned by the Pyth Pull Oracle program. + +Users must ensure that the account passed to their instruction is owned by the Pyth Pull Oracle program. Using Anchor with the `Account<'info, PriceUpdateV2>` type will automatically perform this check. -However, it is the developer's responsibility to perform this check if they are not using Anchor.
-
+However, it is the developer's responsibility to perform this check if they are not using Anchor. + Next, update the instruction logic to read the price from the price update account: @@ -73,7 +69,7 @@ pub fn sample(ctx: Context) -> Result<()> { // get_price_no_older_than will fail if the price update is more than 30 seconds old let maximum_age: u64 = 30; // get_price_no_older_than will fail if the price update is for a different price feed. - // This string is the id of the BTC/USD feed. See https://pyth.network/developers/price-feed-ids for all available IDs. + // This string is the id of the BTC/USD feed. See https://docs.pyth.network/price-feeds/price-feeds for all available IDs. let feed_id: [u8; 32] = get_feed_id_from_hex("0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43")?; let price = price_update.get_price_no_older_than(&Clock::get()?, maximum_age, &feed_id)?; // Sample output: @@ -84,19 +80,17 @@ pub fn sample(ctx: Context) -> Result<()> { } ``` - -
Users must validate the price update for the appropriate **price + + Users must validate the price update for the appropriate **price feed** and **timestamp**. `PriceUpdateV2` guarantees that the account contains a verified price for _some_ price feed at _some_ point in time. There are various methods on this struct (such as `get_price_no_older_than`) that users - can use to implement the necessary checks.
+ can use to implement the necessary checks. -
- If you choose the price feed account integration (see below), you can use an - account address check to validate the price feed ID. -
+If you choose the price feed account integration (see below), you +can use an account address check to validate the price feed ID. -
+ ## Write Frontend Code @@ -137,19 +131,20 @@ const solUsdPriceFeedAccount = pythSolanaReceiver .toBase58(); ``` - -
The Price Feed Accounts integration assumes that an off-chain process is + + The Price Feed Accounts integration assumes that an off-chain process is continuously updating each price feed. The Pyth Data Association sponsors price updates for a subset of commonly used price feeds on shard 0. Please see [Sponsored Feeds](/price-feeds/sponsored-feeds) for a list of sponsored feeds - and their account addresses.
+ and their account addresses. -
Additionally, updating a price feed is a +Additionally, updating a price feed is a permissionless operation, and anyone can run this process. Please see [Using -Scheduler](/price-feeds/schedule-price-updates/using-scheduler) for more -information. Running the scheduler can help with reliability and update -feed/shard pairs that are not part of the default schedule.
-
+Price Pusher](/price-feeds/schedule-price-updates/using-price-pusher) for more +information. Running the Price Pusher can help with reliability and update +feed/shard pairs that are not part of the default schedule. + + ### Price Update Accounts @@ -235,18 +230,16 @@ await pythSolanaReceiver.provider.sendAll( The [SDK documentation](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/solana/sdk/js/pyth_solana_receiver) contains more information about interacting with the Pyth solana receiver contract, including working examples. - -
- Posting and verifying price updates currently requires multiple transactions - on Solana. If your usecase requires a single transaction, you can reduce the - verification level of the posted price updates by replacing - `addPostPriceUpdates` by `addPostPartiallyVerifiedPriceUpdates` in the - transaction builder. Please read the - [VerificationLevel](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/solana/pyth_solana_receiver_sdk/src/price_update.rs#L20) - docs to understand more about the data integrity tradeoffs when using - partially verified price updates. -
-
+ + Posting and verifying price updates currently requires multiple transactions + on Solana. If your usecase requires a single transaction, you can reduce the + verification level of the posted price updates by replacing + `addPostPriceUpdates` by `addPostPartiallyVerifiedPriceUpdates` in the + transaction builder. Please read the + [VerificationLevel](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/solana/pyth_solana_receiver_sdk/src/price_update.rs#L20) + docs to understand more about the data integrity tradeoffs when using + partially verified price updates. + ## Time-Weighted Average Price (TWAP) diff --git a/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/stacks.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/stacks.mdx new file mode 100644 index 0000000000..cfae27e493 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/stacks.mdx @@ -0,0 +1,176 @@ +--- +title: "Stacks Integration" +description: "Consume Pyth Network prices in Stacks applications using Clarity smart contracts" +icon: "Stack" +--- + +# How to Use Real-Time Data in Stacks applications + +[Stacks](https://www.stacks.co/) is a layer 2 network on Bitcoin. It brings programmability and decentralized applications (dApps) to Bitcoin without modifying Bitcoin itself. Stacks lets developers build apps, smart contracts, NFTs, and DeFi on top of Bitcoin — while using Bitcoin as the settlement and security layer. + +This guide explains how to use real-time Pyth data in [Clarity](https://clarity-lang.org/) smart contracts on Stacks. + +## Write Contract Code + +The Pyth protocol integration for Stacks is available as a Beta on both testnet and mainnet networks, to help developers test, give feedback, and ensure the reliability and stability of the integration. +Unlike other smart contract languages, there is no importing modules into Clarity smart contracts for certain security reasons. So the Pyth integration on Stacks is implemented as its own set of Clarity contracts where developers will invoke a `contract-call?` to the main Pyth Clarity [contract](https://explorer.hiro.so/txid/SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-oracle-v4?chain=mainnet). + + + Currently, the Pyth protocol integration is currently maintained by Trust + Machines. It currently supports real-time price feeds for BTC, STX, ETH, and + USDC. To request more price feeds, open an issue in Trust Machine's Pyth + maintained repo [here](https://github.com/Trust-Machines/stacks-pyth-bridge). + + +### Read BTC prices from a Clarity smart contract + +For our example, we will imagine a contract that mints an NFT in exchange for $100 of sBTC. In order to determine the USD value of a user's sBTC amount, we'll need to use Pyth. Since market pricing for sBTC isn't supported currently, we'll use the price data from the BTC/USD price feed. + + + The maintained Pyth integration contract for Stacks is called + [`.pyth-oracle-v4`](https://explorer.hiro.so/txid/SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-oracle-v4?chain=mainnet). + This contract serves as the main entry point for updating and getting price + feed data. + + +You'll notice in the Clarity snippet below we open up `let` bindings of our function to: + +1. Verify & update the BTC price feed with its latest VAA message (more on how to pull the VAA later in this guide). This is a means of participating in the pull price update model. +2. Getting a fresh instance of the updated price data for BTC. + +```clarity +;; --snip-- +(define-public (join-the-benjamin-club (price-feed-bytes (buff 8192))) + (let ( + ;; To verify & update price feeds is to participate in the pull price model of Pyth's decentralization. + ;; A VAA signed message is pulled from Wormhole via the Hermes API. This VAA signed message is what + ;; gets passed into this function to verify & update the price data of a particular price feed. + (update-status (try! (contract-call? 'SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-oracle-v4 + verify-and-update-price-feeds price-feed-bytes { + pyth-storage-contract: 'SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-storage-v4, + pyth-decoder-contract: 'SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-pnau-decoder-v3, + wormhole-core-contract: 'SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.wormhole-core-v4, + }))) + ;; The price data returned will be fresh from the VAA signed message data we passed in above. + (price-data (try! (contract-call? 'SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-oracle-v4 + get-price + ;; The official BTC price feed id. + 0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43 + 'SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-storage-v4 + ))) + ;; --snip-- +``` + +After updating & verifying the price feed in question, and then getting the updated price feed data, we'll need to handle the price feed data and its properties. +The price feed data returned from invoking the `get-price` function of the `.pyth-oracle-v4` contract looks like the below: + +```bash +{ + price-identifier: 0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43, + price: 10603557773590, + conf: u3776653890, + ema-price: 10602069900000, + ema-conf: u4062895700, + expo: -8, + publish-time: u1750425711, + prev-publish-time: u1750425710 +} +``` + +With the price feed data, we can adjust the price based on the `expo` property. Price feeds represent numbers in a fixed-point format. So in the above returned price feed data, the price of `10603557773590` and given `expo` of `-8` should be formatted as `106035`. The same exponent is used for both the price and confidence interval. + +We can then determine the USD amount of sBTC the user owns and decide if it is enough to mint a `benjamin-nft` for $100 worth of sBTC. Benjamin is in reference to Benjamin Franklin being the face of a one hundred dollar bill, get it? + +```clarity +;; --snip -- + ;; Price feeds represent numbers in a fixed-point format. The expo property tells us + ;; at what certain position is the decimal point implicity fixed. + (price-denomination (pow 10 (* (get expo price-data) -1))) + ;; We'll adjust the price to its normal decimal representation. + (adjusted-price (to-uint (/ (get price price-data) price-denomination))) + ;; Get the user's current sBTC balance. + (user-sbtc-balance (unwrap! + (contract-call? 'SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token + get-balance-available tx-sender + ) + ERR_READING_SBTC_BALANCE + )) + ) + ;; Determine if the user has at least $100 worth of sBTC to join the Benjamin Club. + (if (> (/ (* user-sbtc-balance adjusted-price) (to-uint price-denomination)) + COST-OF-BENJAMIN-NFT + ) + (let ((hundred-dollars-in-sbtc (/ (* COST-OF-BENJAMIN-NFT (to-uint price-denomination)) adjusted-price))) + (try! (contract-call? 'SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token + transfer hundred-dollars-in-sbtc tx-sender (as-contract tx-sender) + none + )) + (contract-call? .nft-contract mint tx-sender) + ) + ERR_NOT_ENOUGH_SBTC + ) + ) +) +``` + + + The `verify-and-update-price-feeds` of the `.pyth-oracle-v4` contract applies + a fee of 1 uSTX, or 1 micro-stx, which is 0.000001 STX. + + +Alternatively, developers can just invoke the `read-price-feed` public function of the `pyth-oracle-v4.clar` contract. This will simply return the price feed from the last updated feed. But it's always encouraged to determine if a staleness check is viable for your application. + +## Write Front-End Code + +In your front-end application code, you can install and use the methods brought by Pyth Network's `hermes-client` Javascript SDK to fetch the latest price update, known as a VAA (Verified Action Approvals) message. + +```javascript copy +import { HermesClient } from "@pythnetwork/hermes-client"; + +// --snip-- +async function handleFetchLatestVaa() { + const connection = new HermesClient("https://hermes.pyth.network", {}); + + const priceIds = [ + "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", + ]; + + const priceUpdates = await connection.getLatestPriceUpdates(priceIds); + let latestVaaHex = `0x${priceUpdates.binary.data[0]}`; + + return latestVaaHex; +} +// --snip-- +``` + +The binary data returned from the Pyth SDK will already be in hexadecimal format. We'll then take this hexadecimal VAA message and pass it into our Clarity function as an argument. + +Using Stacks Connect of the [stacks.js](https://github.com/hirosystems/stacks.js) monorepo, we'll open up a stx_callContract request and invoke our public function while passing in the latestVaaHex as the function argument. + +```javascript copy +let latestVaaHex = await handleFetchLatestVaa(); + +let postCond1 = Pc.principal("SP1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRCBGD7R") + .willSendLte(1) + .ustx(); + +const response = await request("stx_callContract", { + contract: `SP1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRCBGD7R.benjamin-club`, + functionName: "join-the-benjamin-club", + functionArgs: [Cl.bufferFromHex(latestVaaHex)], + network: "mainnet", + postConditions: [postCond1], + postConditionMode: "deny", +}); +``` + +If you noticed, we set a post-condition statement of our user transferring less than or equal to 1 uSTX, which is 0.000001 STX. This is because the `verify-and-update-price-feeds` of the `.pyth-oracle-v4` contract applies a fee for this. Setting a separate post-condition statement on the actual sbtc token transfer in our example will also be needed. Beforehand, you could invoke the `decode-price-feeds` function with the `latestVaaHex` to simply have the contained price data decoded and returned. From there you could pre-determine the estimated amount of sbtc tokens to be transferred and set in a separate post-condition. + +## Additional Resources + +You may find these additional resources helpful for developing your Stacks application with Pyth. + +- **[Hiro Docs](https://docs.hiro.so/resources/guides/using-pyth-price-feeds):** Check out the dedicated guide for using Pyth in Stacks applications in Hiro's documentation. In this guide you'll see a visual architecture overview of using Pyth in Stacks, how you can test your implementation, how to fetch VAAs on the front-end, learn best practices, and more. +- **[Hiro How-To Tutorial](https://youtu.be/eybqQVRh_hw?si=KNfUp3RS3CnaST91):** Watch the dedicated video tutorial on using Pyth in Stacks and learn how a major Stacks DeFi app, Granite, is using Pyth. +- **[Trust Machine's Pyth Github](https://github.com/Trust-Machines/stacks-pyth-bridge):** Check out the open-source repo for the Pyth integration Clarity contracts. +- **[pyth-oracle-v4.clar](https://explorer.hiro.so/txid/SP1CGXWEAMG6P6FT04W66NVGJ7PQWMDAC19R7PJ0Y.pyth-oracle-v4?chain=mainnet):** The latest Pyth integration contract on Stacks' mainnet. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/starknet.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/starknet.mdx similarity index 80% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/starknet.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/starknet.mdx index 944f1f364d..a4b5510198 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/starknet.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/starknet.mdx @@ -1,12 +1,11 @@ --- -title: Using Real-Time Pyth Data in Starknet Contracts -description: >- - The SDK offers code examples for integrating live Pyth price feeds into - Starknet smart contracts, enabling automated real-time on-chain data updates. -full: false -index: false +title: "Starknet Pull Integration" +description: "Consume Pyth Network prices in Starknet applications using Cairo smart contracts" +icon: "Star" --- +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + # How to Use Real-Time Data in Starknet Contracts This guide explains how to use real-time Pyth data in Starknet contracts. @@ -22,9 +21,21 @@ pyth = { git = "https://github.com/pyth-network/pyth-crosschain.git", tag = "pyt Pyth also provides a javascript SDK to interact with the Pyth contract on Starknet. You can install it using the following command: - - ```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 @@ -99,7 +110,7 @@ mod example_contract { // Read the current price from a price feed. // STRK/USD price feed ID - // The complete list of feed IDs is available at https://pyth.network/developers/price-feed-ids + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds let strk_usd_price_id = 0x6a182399ff70ccf3e06024898942028204125a819e519a335ffa4579e66cd870; let price = pyth @@ -115,25 +126,22 @@ The pyth_price_update argument contains verified prices from Pyth. Calling pyth.update_price_feeds with this value updates the on-chain Pyth price and ensures your application has recent price data. The pyth_price_update can be fetched from Hermes; Consult [Fetch Price Updates](https://docs.pyth.network/price-feeds/fetch-price-updates) for more information on how to fetch the pyth_price_update. - -
- Unlike Ethereum, there is no native token on Starknet. You cannot pass - tokens implicitly when calling functions. Moreover, there is no concept of a - designated payer account, unlike Solana. In Starknet, all token transfers - must be performed explicitly by calling functions on the token's ERC20 - contract. Regarding the Pyth contract on Starknet, the caller must approve - the fee transfer before calling `update_price_feeds` or using similar - methods. You can use **STRK** or **ETH** to pay the fee, but STRK is - preferred. The fee is currently set to the minimum possible value (1e-18 - STRK, 1 WEI). -
-
+ + Unlike Ethereum, there is no native token on Starknet. You cannot pass tokens + implicitly when calling functions. Moreover, there is no concept of a + designated payer account, unlike Solana. In Starknet, all token transfers must + be performed explicitly by calling functions on the token's ERC20 contract. + Regarding the Pyth contract on Starknet, the caller must approve the fee + transfer before calling `update_price_feeds` or using similar methods. You can + use **STRK** or **ETH** to pay the fee, but STRK is preferred. The fee is + currently set to the minimum possible value (1e-18 STRK, 1 WEI). + The code snippet above does the following things: 1. Call `pyth.get_update_fee` to get the fee required to update the Pyth price feeds. 1. Call `pyth.update_price_feeds` and pass `pyth_price_update` to update the Pyth price feeds. -1. Call `pyth.get_price_no_older_than` to read the price, providing the [price feed ID](https://pyth.network/developers/price-feed-ids) you wish to read. +1. Call `pyth.get_price_no_older_than` to read the price, providing the [price feed ID](../price-feeds.mdx) you wish to read. ### Write Client Code @@ -161,13 +169,11 @@ const currentPrices = await connection.getLatestPriceFeeds([priceId]); const pythUpdate = ByteBuffer.fromBase64(currentPrices[0].vaa); ``` - -
- Price updates must be converted to `ByteBuffer` before being passed on to - the Pyth contract on Starknet. Use the `ByteBuffer` type from - `@pythnetwork/pyth-starknet-js` package as shown above. -
-
+ + Price updates must be converted to `ByteBuffer` before being passed on to the + Pyth contract on Starknet. Use the `ByteBuffer` type from + `@pythnetwork/pyth-starknet-js` package as shown above. + ## Additional Resources diff --git a/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/sui.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/sui.mdx new file mode 100644 index 0000000000..f487f1af43 --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/sui.mdx @@ -0,0 +1,251 @@ +--- +title: "Sui Pull Integration" +description: "Integrate Pyth Network real-time price data in Sui Move contracts using programmable transactions" +icon: "Drop" +--- + +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + +# How to Use Real-Time Data in Sui Contracts + +This guide explains how to use real-time Pyth data in Sui applications. + +## Install Pyth SDK + +Use the following dependency in your `Move.toml` file to use the latest Pyth Sui package and its dependencies: + + + +```sh copy +[dependencies.Pyth] +git = "https://github.com/pyth-network/pyth-crosschain.git" +subdir = "target_chains/sui/contracts" +rev = "sui-contract-mainnet" + +[dependencies.Wormhole] +git = "https://github.com/wormhole-foundation/wormhole.git" +subdir = "sui/wormhole" +rev = "sui/mainnet" + +# Pyth is locked into this specific `rev` because the package depends on Wormhole and is pinned to this version. + +[dependencies.Sui] +git = "https://github.com/MystenLabs/sui.git" +subdir = "crates/sui-framework/packages/sui-framework" +rev = "041c5f2bae2fe52079e44b70514333532d69f4e6" + +```` + + +```sh copy +[dependencies.Pyth] +git = "https://github.com/pyth-network/pyth-crosschain.git" +subdir = "target_chains/sui/contracts" +rev = "sui-contract-testnet" + +[dependencies.Wormhole] +git = "https://github.com/wormhole-foundation/wormhole.git" +subdir = "sui/wormhole" +rev = "sui/testnet" + +# Pyth is locked into this specific `rev` because the package depends on Wormhole and is pinned to this version. +[dependencies.Sui] +git = "https://github.com/MystenLabs/sui.git" +subdir = "crates/sui-framework/packages/sui-framework" +rev = "041c5f2bae2fe52079e44b70514333532d69f4e6" +```` + + + + +Pyth also provides a javascript SDK to construct transaction blocks that update price feeds: + + + + ```sh + # NPM + npm install --save @pythnetwork/pyth-sui-js + + # Yarn + yarn add @pythnetwork/pyth-sui-js + ``` + + + + +## Write Contract Code + +The code snippet below provides a general template for what your contract code should look like: + +```rust {18} copy +/// Module: oracle +module oracle::oracle; + +use sui::clock::Clock; +use pyth::price_info; +use pyth::price_identifier; +use pyth::price; +use pyth::i64::I64; +use pyth::pyth; +use pyth::price_info::PriceInfoObject; + +const E_INVALID_ID: u64 = 1; + +public fun get_sui_price( + // Other arguments + clock: &Clock, + price_info_object: &PriceInfoObject, +): I64 { + let max_age = 60; + + // Make sure the price is not older than max_age seconds + let price_struct = pyth::get_price_no_older_than(price_info_object, clock, max_age); + + // Check the price feed ID + let price_info = price_info::get_price_info_from_price_info_object(price_info_object); + let price_id = price_identifier::get_bytes(&price_info::get_price_identifier(&price_info)); + + // SUI/USD price feed ID + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds + // Note: Sui uses the Pyth price feed ID without the `0x` prefix. + let testnet_sui_price_id = x"50c67b3fd225db8912a424dd4baed60ffdde625ed2feaaf283724f9608fea266"; + assert!(price_id == testnet_sui_price_id, E_INVALID_ID); + + // Extract the price, decimal, and timestamp from the price struct and use them. + let _decimal_i64 = price::get_expo(&price_struct); + let price_i64 = price::get_price(&price_struct); + let _timestamp_sec = price::get_timestamp(&price_struct); + + price_i64 +} +``` + +One can consume the price by calling `pyth::get_price` abovementioned or other utility functions on the `PriceInfoObject` in the Move module + +The code snippet below provides an example of how to update the Pyth price feeds: + +```ts copy +import { + SuiPythClient, + SuiPriceServiceConnection, +} from "@pythnetwork/pyth-sui-js"; +import { SuiClient } from "@mysten/sui/client"; +import { Transaction } from "@mysten/sui/transactions"; +import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; + +/// Step 1: Get the off-chain data. +const connection = new SuiPriceServiceConnection( + "https://hermes-beta.pyth.network", // [!] Only for Sui Testnet + // "https://hermes.pyth.network/", // Use this for Mainnet + { + // Provide this option to retrieve signed price updates for on-chain contracts! + priceFeedRequestConfig: { + binary: true, + }, + }, +); +const priceIDs = [ + // You can find the IDs of prices at https://docs.pyth.network/price-feeds/price-feeds + "0x50c67b3fd225db8912a424dd4baed60ffdde625ed2feaaf283724f9608fea266", // SUI/USD price ID +]; +const priceUpdateData = await connection.getPriceFeedsUpdateData(priceIDs); + +/// Step 2: Submit the new price on-chain and verify it using the contract. +const suiClient = new SuiClient({ url: "https://fullnode.testnet.sui.io:443" }); + +// Fixed the StateIds using the CLI example extracting them from +// here: https://docs.pyth.network/price-feeds/contract-addresses/sui +const pythTestnetStateId = + "0x243759059f4c3111179da5878c12f68d612c21a8d54d85edc86164bb18be1c7c"; // Testnet +const wormholeTestnetStateId = + "0x31358d198147da50db32eda2562951d53973a0c0ad5ed738e9b17d88b213d790"; // Testnet + +const pythClient = new SuiPythClient( + suiClient, + pythTestnetStateId, + wormholeTestnetStateId, +); + +const transaction = new Transaction(); + +/// By calling the updatePriceFeeds function, the SuiPythClient adds the necessary +/// transactions to the transaction block to update the price feeds. +const priceInfoObjectIds = await pythClient.updatePriceFeeds( + transaction, + priceUpdateData, + priceIDs, +); + +let suiPriceObjectId = priceInfoObjectIds[0]; +if (!suiPriceObjectId) { + throw new Error("suiPriceObjectId is undefined"); +} + +/// This is the package id that we receive after publishing `oracle` contract from the previous step. +let testnetExampleContractPackageId = + "0x42d05111a160febe4144338647e0b7a80daea459c765c1e29a7a6198b235f67c"; +const CLOCK = + "0x0000000000000000000000000000000000000000000000000000000000000006"; +transaction.moveCall({ + target: `${testnetExampleContractPackageId}::oracle::get_sui_price`, + arguments: [transaction.object(CLOCK), transaction.object(suiPriceObjectId)], +}); +transaction.setGasBudget(1000000000); + +const keypair = Ed25519Keypair.fromSecretKey( + process.env.ADMIN_SECRET_KEY!.toLowerCase(), +); +const result = await suiClient.signAndExecuteTransaction({ + transaction, + signer: keypair, + options: { + showEffects: true, + showEvents: true, + }, +}); +``` + +By calling the `updatePriceFeeds` function, the `SuiPythClient` adds the necessary transactions to the transaction block to update the price feeds. + + + +Your Sui Move module **should NOT** have a hard-coded call to `pyth::update_single_price_feed.` In other words, a contract should **never call** the Sui Pyth `pyth::update_single_price_feed` entry point. Instead, it should be called directly from client code (e.g., Typescript or Rust). + +When Sui contracts are [upgraded](<(https://docs.sui.io/build/package-upgrades)>), the address changes, which makes the old address no longer valid. If your module has a hard-coded call to `pyth::update_single_price_feed` living at a fixed call-site, it may eventually get bricked due to how Pyth upgrades are implemented. (Pyth only allow users to interact with the most recent package version for security reasons). + +Therefore, you should build a [Sui programmable transaction](https://docs.sui.io/build/prog-trans-ts-sdk) that first updates the price by calling `pyth::update_single_price_feed` at the latest call-site from the client-side and then call a function in your contract that invokes `pyth::get_price` on the `PriceInfoObject` to get the recently updated price. +You can use `SuiPythClient` to build such transactions and handle all the complexity of updating the price feeds. + +Consult [Fetch Price Updates](../fetch-price-updates) for more information on how to fetch the `pyth_price_update`. + + + +## Additional Resources + +You may find these additional resources helpful for developing your Sui application. + +### CLI Example + +[This example](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/sui/cli) shows how to update prices on a Sui network. It does the following: + +1. Fetches update data from Hermes for the given price feeds. +1. Call the Pyth Sui contract with a price update. + +You can run this example with `npm run example-relay`. A full command that updates prices on the Sui testnet looks like this: + +```bash +export SUI_KEY=YOUR_PRIV_KEY; +npm run example-relay -- --feed-id "5a035d5440f5c163069af66062bac6c79377bf88396fa27e6067bfca8096d280" \ +--hermes "https://hermes-beta.pyth.network" \ +--full-node "https://fullnode.testnet.sui.io:443" \ +--pyth-state-id "0x243759059f4c3111179da5878c12f68d612c21a8d54d85edc86164bb18be1c7c" \ +--wormhole-state-id "0x31358d198147da50db32eda2562951d53973a0c0ad5ed738e9b17d88b213d790" +``` + +### Contract Addresses + +Consult [Sui Contract Addresses](../contract-addresses/sui) to find the package IDs. + +### Pyth Price Feed IDs + +Consult [Pyth Price Feed IDs](../price-feeds.mdx) to find Pyth price feed IDs for various assets. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/ton.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/ton.mdx similarity index 85% rename from apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/ton.mdx rename to apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/ton.mdx index 16be590fd7..e9170910bb 100644 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/ton.mdx +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/pull-integration/ton.mdx @@ -1,13 +1,11 @@ --- -title: "Pyth Network TON Integration: Real-Time Data Usage" -description: >- - Easily integrate Pyth Network’s live price feeds into your TON apps. Use our - SDK, handle smart contract interactions, and automate data updates for - precise, on-chain pricing. -full: false -index: false +title: "TON Integration" +description: "Consume Pyth Network prices in TON applications using smart contracts" +icon: "Diamond" --- +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + # How to Use Real-Time Data in TON Contracts This guide explains how to use real-time Pyth data in TON applications. @@ -16,25 +14,19 @@ This guide explains how to use real-time Pyth data in TON applications. Install the Pyth TON SDK and other necessary dependencies using npm: - - - {/* prettier-ignore-start */} - - ```sh copy - npm install @pythnetwork/pyth-ton-js @pythnetwork/hermes-client @ton/core @ton/ton @ton/crypto - ``` + + - {/* prettier-ignore-end */} +```sh copy +npm install @pythnetwork/pyth-ton-js @pythnetwork/hermes-client @ton/core @ton/ton @ton/crypto +``` - - {/* prettier-ignore-start */} + - ```sh copy - yarn add @pythnetwork/pyth-ton-js @pythnetwork/hermes-client @ton/core @ton/ton @ton/crypto - ``` - - {/* prettier-ignore-end */} +```sh copy +yarn add @pythnetwork/pyth-ton-js @pythnetwork/hermes-client @ton/core @ton/ton @ton/crypto +``` @@ -43,7 +35,7 @@ Install the Pyth TON SDK and other necessary dependencies using npm: The code snippet below provides an example sending a message to the Pyth price feed contract and call the `parse_price_feed_updates` method: -```lisp copy +```func copy ;; Create message to Pyth contract according to schema cell msg = begin_cell() .store_uint(0x18, 6) ;; nobounce @@ -141,7 +133,7 @@ This code snippet does the following: You may find these additional resources helpful for developing your TON application: - [TON Documentation](https://ton.org/docs/) -- [Pyth Price Feed IDs](https://pyth.network/developers/price-feed-ids) +- [Pyth Price Feed IDs](../price-feeds.mdx) - [Pyth TON Contract](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ton/contracts) - [Pyth TON SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ton/sdk) - [Pyth TON SDK Example](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/ton/sdk_js_usage) diff --git a/apps/developer-hub/content/docs/price-feeds/use-real-time-data/push-integration.mdx b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/push-integration.mdx new file mode 100644 index 0000000000..c94934a27f --- /dev/null +++ b/apps/developer-hub/content/docs/price-feeds/use-real-time-data/push-integration.mdx @@ -0,0 +1,77 @@ +--- +title: "Push Integration" +description: "Use real-time price data with push integration across various blockchain ecosystems including EVM, Solana, and Aptos" +icon: "ArrowCircleUp" +--- + +# How to Use Real-Time Data using Push Integration + +This guide will walk you through the steps to use real-time price data using push integration in various ecosystems. + +To use the push integration, developers first need to ensure the feeds used by their application are being updated on-chain. +Refer to the [Push Feeds page](../push-feeds) to see which feeds are being updated on each blockchain. +If your feeds are not listed there, you have several options: + +- **Request Feeds**: Fill out [this form](https://tally.so/r/nGz2jj) to request the feeds you need. This is the fastest and simplest way to get your feeds pushed on chain. +- **Run Price Pusher**: Set up and run a [Price Pusher](/price-feeds/schedule-price-updates/using-price-pusher) to automate the process of updating the on-chain price + +To use real-time price data using push feeds, developers can use the following code snippet based on the ecosystem: + +### EVM + +Developers building on EVM chains can use push feeds to consume real-time price data by reading the price from the Pyth oracle smart contract. + +```solidity copy +PythStructs.Price memory price = pyth.getPriceNoOlderThan(priceFeedId, 60); +``` + +Developers only need to pass the price feed ID to the above method from the [Push Feeds list](../push-feeds). + +Sample code snippet: + +```solidity {30-31} copy +pragma solidity ^0.8.0; + +import "@pythnetwork/pyth-sdk-solidity/IPyth.sol"; +import "@pythnetwork/pyth-sdk-solidity/PythStructs.sol"; + +contract SomeContract { + IPyth pyth; + + /** + * @param pythContract The address of the Pyth contract + */ + constructor(address pythContract) { + // The IPyth interface from pyth-sdk-solidity provides the methods to interact with the Pyth contract. + // Instantiate it with the Pyth contract address from https://docs.pyth.network/price-feeds/contract-addresses/evm + pyth = IPyth(pythContract); + } + + /** + * This method is an example of how to interact with the Pyth contract using Push Integration. + */ + function exampleMethod() public { + // Read the current price from a price feed if it is less than 60 seconds old. + // Each price feed (e.g., ETH/USD) is identified by a price feed ID. + // The complete list of feed IDs is available at https://docs.pyth.network/price-feeds/price-feeds + bytes32 priceFeedId = 0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace; // ETH/USD + PythStructs.Price memory price = pyth.getPriceNoOlderThan(priceFeedId, 60); + } +} + +``` + +### SVM + +Developers building on SVM chains can use Price Feed Accounts to integrate Pyth using push integration. +The [SVM guide](../use-real-time-data/solana#price-feed-accounts) explains in detail how to integrate Pyth using Price Feed Accounts. + +### Aptos + +Developers building on Aptos can use push feeds to consume real-time price data by reading the price from the Pyth Oracle smart contract on Aptos. + +```rust copy +let btc_price_identifier = x"e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"; +let btc_usd_price_id = price_identifier::from_byte_vec(btc_price_identifier); +pyth::get_price(btc_usd_price_id) +``` diff --git a/apps/developer-hub/content/docs/price-feeds/v1/assets/Push-vs-Pull-Oracle.jpg b/apps/developer-hub/content/docs/price-feeds/v1/assets/Push-vs-Pull-Oracle.jpg deleted file mode 100644 index 45193c04e5..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/assets/Push-vs-Pull-Oracle.jpg and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/evm.mdx b/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/evm.mdx deleted file mode 100644 index c5375db075..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/evm.mdx +++ /dev/null @@ -1,199 +0,0 @@ ---- -title: Pyth Networks EVM Contract Addresses & Price Feed IDs -description: >- - Browse Pyth’s EVM contract addresses for mainnet and testnet, with direct - explorer links—stay up to date on all network deployments. -full: false -index: false ---- - -# Price Feed Contract Addresses on EVM Networks - -Pyth is currently available on the EVM networks below using Pyth Stable price sources that are accessible via Hermes Stable. - -## Mainnets - -| Network | Contract address | -| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| Abstract | [`0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1`](https://abscan.org/address/0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1) | -| Apechain | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://apechain.calderaexplorer.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Arbitrum | [`0xff1a0f4744e8582DF1aE09D5611b887B6a12925C`](https://arbiscan.io/address/0xff1a0f4744e8582df1ae09d5611b887b6a12925c) | -| Aurora | [`0xF89C7b475821EC3fDC2dC8099032c05c6c0c9AB9`](https://explorer.aurora.dev/address/0xF89C7b475821EC3fDC2dC8099032c05c6c0c9AB9) | -| Avalanche | [`0x4305FB66699C3B2702D4d05CF36551390A4c69C6`](https://snowtrace.io/address/0x4305fb66699c3b2702d4d05cf36551390a4c69c6) | -| Berachain | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://berascan.com/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Bittensor | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://evm.taostats.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Blast | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://blastscan.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| BNB | [`0x4D7E825f80bDf85e913E0DD2A2D54927e9dE1594`](https://bscscan.com/address/0x4d7e825f80bdf85e913e0dd2a2d54927e9de1594) | -| BTTC | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://bttcscan.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Base | [`0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a`](https://basescan.org/address/0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a) | -| Boba | [`0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF`](https://bobascan.com/address/0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF) | -| Canto | [`0x98046Bd286715D3B0BC227Dd7a956b83D8978603`](https://canto.dex.guru/address/0x78357316239040e19fc823372cc179ca75e64b81) | -| Celo | [`0xff1a0f4744e8582DF1aE09D5611b887B6a12925C`](https://celoscan.io/address/0xff1a0f4744e8582df1ae09d5611b887b6a12925c) | -| Chiliz | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://scan.chiliz.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Conflux eSpace | [`0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc`](https://evm.confluxscan.io/address/0xe9d69cdd6fe41e7b621b4a688c5d1a68cb5c8adc) | -| Core DAO | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://scan.coredao.org/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Cronos | [`0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B`](https://cronoscan.com/address/0xe0d0e68297772dd5a1f1d99897c581e2082dba5b) | -| Cronos zkEVM | [`0x056f829183Ec806A78c26C98961678c24faB71af`](https://explorer.zkevm.cronos.org/address/0x056f829183ec806a78c26c98961678c24fab71af) | -| EOS | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer.evm.eosnetwork.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| EVMOS | [`0x354bF866A4B006C9AF9d9e06d9364217A8616E12`](https://www.mintscan.io/evmos/evm/contract/0x354bF866A4B006C9AF9d9e06d9364217A8616E12) | -| Ethereum | [`0x4305FB66699C3B2702D4d05CF36551390A4c69C6`](https://etherscan.io/address/0x4305fb66699c3b2702d4d05cf36551390a4c69c6) | -| Etherlink | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.etherlink.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Eventum | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.evedex.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Fantom | [`0xff1a0f4744e8582DF1aE09D5611b887B6a12925C`](https://explorer.fantom.network/address/0xff1a0f4744e8582DF1aE09D5611b887B6a12925C) | -| Filecoin | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://filfox.info/en/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Flow | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://evm.flowscan.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Gnosis | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://gnosisscan.io/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Gravity | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.gravity.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Hedera | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://hashscan.io/mainnet/contract/0.0.4622850) | -| Hemi | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer-b81c3bd8.hemi.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Horizen EON | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://eon-explorer.horizenlabs.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| HyperEVM | [`0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc`](https://purrsec.com/address/0xe9d69cdd6fe41e7b621b4a688c5d1a68cb5c8adc) | -| XCHAIN (IDEX) Mainnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://xchain-explorer.kuma.bid/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Injective inEVM | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://inevm.calderaexplorer.xyz/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Ink | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.inkonchain.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Iota | [`0x8D254a21b3C86D32F7179855531CE99164721933`](https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933) | -| Kava | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer.kava.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| KCC | [`0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B`](https://explorer.kcc.io/en/address/0xe0d0e68297772dd5a1f1d99897c581e2082dba5b) | -| Kinto | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://kintoscan.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Kaia | [`0x2880ab155794e7179c9ee2e38200202908c17b43`](https://kaiascan.io/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| LightLink Phoenix | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://phoenix.lightlink.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Linea | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer.linea.build/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Manta | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://pacific-explorer.manta.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Mantle | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://mantlescan.info/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Merlin | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://scan.merlinchain.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Meter | [`0xbFe3f445653f2136b2FD1e6DdDb5676392E3AF16`](https://scan.meter.io/address/0xbfe3f445653f2136b2fd1e6dddb5676392e3af16) | -| Mode | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer.mode.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Morph | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.morphl2.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Neon | [`0x7f2dB085eFC3560AFF33865dD727225d91B4f9A5`](https://neonscan.org/address/0x7f2dB085eFC3560AFF33865dD727225d91B4f9A5) | -| OpBNB | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://opbnbscan.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Optimism | [`0xff1a0f4744e8582DF1aE09D5611b887B6a12925C`](https://optimistic.etherscan.io/address/0xff1a0f4744e8582df1ae09d5611b887b6a12925c) | -| Polygon | [`0xff1a0f4744e8582DF1aE09D5611b887B6a12925C`](https://polygonscan.com/address/0xff1a0f4744e8582df1ae09d5611b887b6a12925c) | -| Polygon zkEVM | [`0xC5E56d6b40F3e3B5fbfa266bCd35C37426537c65`](https://zkevm.polygonscan.com/address/0xc5e56d6b40f3e3b5fbfa266bcd35c37426537c65) | -| Polynomial | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.polynomial.fi/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Ronin | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://app.roninchain.com/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Scroll | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://blockscout.scroll.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Superseed | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer.superseed.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Sei EVM | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://seitrace.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43?chain=pacific-1) | -| Shimmer | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer.evm.shimmer.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Skate | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://scan.skatechain.org/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Sonic | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://sonicscan.org/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Soneium | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://soneium.blockscout.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Story Protocol | [`0xD458261E832415CFd3BAE5E416FdF3230ce6F134`](https://www.storyscan.xyz/address/0xD458261E832415CFd3BAE5E416FdF3230ce6F134) | -| Swellchain | [`0xDd24F84d36BF92C65F92307595335bdFab5Bbd21`](https://explorer.swellnetwork.io/address/0xDd24F84d36BF92C65F92307595335bdFab5Bbd21) | -| Taiko | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://taikoscan.network/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Unichain | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://uniscan.xyz/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Viction | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://tomoscan.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| WEMIX | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer.wemix.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Worldchain | [`0xe9d69cdd6fe41e7b621b4a688c5d1a68cb5c8adc`](https://worldscan.org/address/0xe9d69cdd6fe41e7b621b4a688c5d1a68cb5c8adc) | -| ZKFair | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://scan.zkfair.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| zkSync Era | [`0xf087c864AEccFb6A2Bf1Af6A0382B0d0f6c5D834`](https://explorer.zksync.io/address/0xf087c864AEccFb6A2Bf1Af6A0382B0d0f6c5D834) | -| zetachain | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://zetachain.blockscout.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | - -## Testnets - -| Network | Contract address | -| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Abstract testnet | [`0x47F2A9BDAd52d65b66287253cf5ca0D2b763b486`](https://explorer.testnet.abs.xyz/address/0x47F2A9BDAd52d65b66287253cf5ca0D2b763b486) | -| ApeChain (testnet) | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://curtis.explorer.caldera.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Arbitrum Blueberry (testnet) | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://arb-blueberry.gelatoscout.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Arbitrum Sepolia (testnet) | [`0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF`](https://sepolia-explorer.arbitrum.io/address/0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF) | -| Aurora testnet | [`0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E`](https://explorer.testnet.aurora.dev/address/0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E) | -| BNB testnet | [`0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb`](https://testnet.bscscan.com/address/0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb) | -| BTTC testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://testnet.bttcscan.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Base Sepolia (testnet) | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://base-sepolia.blockscout.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Berachain Bepolia testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://bepolia.beratrail.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Bittensor testnet | [`0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1`]() | -| Blast Sepolia | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://testnet.blastscan.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Ble testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer-ethena-testnet-0.t.conduit.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Boba Goerli (testnet) | [`0x8D254a21b3C86D32F7179855531CE99164721933`](https://testnet.bobascan.com/address/0x8D254a21b3C86D32F7179855531CE99164721933) | -| Boba Sepolia (testnet) | [`0x8D254a21b3C86D32F7179855531CE99164721933`](https://28882.testnet.routescan.io/address/0x8D254a21b3C86D32F7179855531CE99164721933) | -| Canto testnet | [`0x26DD80569a8B23768A1d80869Ed7339e07595E85`](https://testnet-explorer.canto.neobase.one/address/0x26DD80569a8B23768A1d80869Ed7339e07595E85) | -| Celo Alfajores (testnet) | [`0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E`](https://explorer.celo.org/alfajores/address/0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E) | -| Chiado (Gnosis testnet) | [`0x98046Bd286715D3B0BC227Dd7a956b83D8978603`](https://blockscout.com/gnosis/chiado/address/0x98046Bd286715D3B0BC227Dd7a956b83D8978603) | -| Chiliz testnet | [`0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509`](https://spicy-explorer.chiliz.com/address/0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509) | -| Conflux eSpace testnet | [`0xDd24F84d36BF92C65F92307595335bdFab5Bbd21`](https://evmtestnet.confluxscan.io/address/0xDd24F84d36BF92C65F92307595335bdFab5Bbd21) | -| Core DAO testnet | [`0x8D254a21b3C86D32F7179855531CE99164721933`](https://scan.test.btcs.network/address/0x8D254a21b3C86D32F7179855531CE99164721933) | -| Converge testnet | [`0x87047526937246727E4869C5f76A347160e08672`](https://explorer-converge-testnet-1.t.conduit.xyz/address/0x87047526937246727E4869C5f76A347160e08672) | -| Cronos testnet | [`0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320`](https://cronos.org/explorer/testnet3/address/0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320) | -| Cronos zkEVM Testnet | [`0xB1DB1498902F08E16E11F1a423ec9CCB9537E1D6`](https://explorer.zkevm.cronos.org/testnet/address/0xb1db1498902f08e16e11f1a423ec9ccb9537e1d6) | -| Dela Deperp Testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://sepolia-delascan.deperp.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Dela Deperp Mithreum Testnet | [`0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc`](https://mithreum-sepolia.deperp.com/address/0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc) | -| EOS testnet | [`0x0708325268dF9F66270F1401206434524814508b`](https://explorer.testnet.evm.eosnetwork.com/address/0x0708325268dF9F66270F1401206434524814508b) | -| Etherlink testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://testnet.explorer.etherlink.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Eventum testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://testnet-blockscout.eh-dev.app/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| EVMOS testnet | [`0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E`](https://evm.evmos.dev/address/0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E) | -| Fantom testnet | [`0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb`](https://testnet.ftmscan.com/address/0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb) | -| Filecoin calibration | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://calibration.filfox.info/en/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Flow Testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://evm-testnet.flowscan.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Fuji (Avalanche testnet) | [`0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509`](https://testnet.snowtrace.io/address/0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509) | -| Hedera testnet | [`0xa2aa501b19aff244d90cc15a4cf739d2725b5729`](https://hashscan.io/testnet/contract/0.0.3042133) | -| Hemi testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://testnet.explorer.hemi.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| HyperEVM testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://testnet.purrsec.com/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| XCHAIN (IDEX) testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://xchain-testnet-explorer.kuma.bid/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Injective inEVM testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://inevm-testnet.explorer.caldera.xyz/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Kakarot Sepolia testnet | [`0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc`](https://sepolia.kakarotscan.org/address/0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc) | -| Kava testnet | [`0xfA25E653b44586dBbe27eE9d252192F0e4956683`](https://explorer.testnet.kava.io/address/0xfA25E653b44586dBbe27eE9d252192F0e4956683) | -| KCC testnet | [`0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E`](https://scan-testnet.kcc.network/address/0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E) | -| Klaytn | [`0x2880ab155794e7179c9ee2e38200202908c17b43`](https://baobab.klaytnfinder.io/account/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Injective EVM | [`0x2880ab155794e7179c9ee2e38200202908c17b43`](https://k8s.testnet.evm.blockscout.injective.network/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Ink Sepolia | [`0x2880ab155794e7179c9ee2e38200202908c17b43`](https://explorer-sepolia.inkonchain.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Kaia testnet | [`0x2880ab155794e7179c9ee2e38200202908c17b43`](https://kairos.kaiascan.io/address/0x2880ab155794e7179c9ee2e38200202908c17b43?tabId=txList&page=1) | -| LightLink Pegasus | [`0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167`](https://pegasus.lightlink.io/address/0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167) | -| Linea Goerli | [`0xdF21D137Aadc95588205586636710ca2890538d5`](https://goerli.lineascan.build/address/0xdF21D137Aadc95588205586636710ca2890538d5) | -| Linea Sepolia | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://sepolia.lineascan.build/address/0xa2aa501b19aff244d90cc15a4cf739d2725b5729) | -| Manta testnet | [`0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c`](https://pacific-explorer.testnet.manta.network/address/0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c) | -| Manta Sepolia | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://pacific-explorer.sepolia-testnet.manta.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Mantle sepolia | [`0x98046Bd286715D3B0BC227Dd7a956b83D8978603`](https://explorer.sepolia.mantle.xyz/address/0x98046Bd286715D3B0BC227Dd7a956b83D8978603) | -| MegaEth Testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://www.megaexplorer.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Merlin testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://testnet-scan.merlinchain.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Merlin testnet V2 | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://testnet-scan-v2.merlinchain.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Meter testnet | [`0x5a71C07a0588074443545eE0c08fb0375564c3E4`](https://scan-warringstakes.meter.io/address/0x5a71C07a0588074443545eE0c08fb0375564c3E4) | -| Mode testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://sepolia.explorer.mode.network/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Monad testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://testnet.monadexplorer.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Monad testnet - beta oracle | [`0xad2B52D2af1a9bD5c561894Cdd84f7505e1CD0B5`](https://testnet.monadexplorer.com/address/0xad2B52D2af1a9bD5c561894Cdd84f7505e1CD0B5) | -| Morph Holesky testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://explorer-holesky.morphl2.io/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Morph testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://explorer-testnet.morphl2.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Mumbai (Polygon testnet) | [`0xFC6bd9F9f0c6481c6Af3A7Eb46b296A5B85ed379`](https://mumbai.polygonscan.com/address/0xFC6bd9F9f0c6481c6Af3A7Eb46b296A5B85ed379) | -| Neon devnet | [`0x0708325268dF9F66270F1401206434524814508b`](https://devnet.neonscan.org/address/0x0708325268dF9F66270F1401206434524814508b) | -| Olive Testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://olive-network-testnet.explorer.caldera.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| OpBNB Testnet | [`0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c`](https://testnet.opbnbscan.com/address/0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c) | -| Optimism Goerli (testnet) | [`0xDd24F84d36BF92C65F92307595335bdFab5Bbd21`](https://goerli-optimism.etherscan.io/address/0xDd24F84d36BF92C65F92307595335bdFab5Bbd21) | -| Optimism Sepolia (testnet) | [`0x0708325268dF9F66270F1401206434524814508b`](https://optimism-sepolia.blockscout.com/address/0x0708325268dF9F66270F1401206434524814508b) | -| Optimism Celestia Raspberry | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://opcelestia-raspberry.gelatoscout.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Orange Avalanche Subnet (testnet) | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://subnets-test.avax.network/orangetest/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Polygon Amoy testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://www.oklink.com/amoy/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Polygon Blackberry testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://polygon-blackberry.gelatoscout.com/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| Polygon zkEVM testnet | [`0xFf255f800044225f54Af4510332Aa3D67CC77635`](https://testnet-zkevm.polygonscan.com/address/0xFf255f800044225f54Af4510332Aa3D67CC77635) | -| Polynomial testnet | [`0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509`](https://explorerl2new-polynomial-network-testnet-x0tryg8u1c.t.conduit.xyz/address/0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509) | -| Reya testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://reya-cronos.blockscout.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Saigon (Ronin testnet) | [`0xEbe57e8045F2F230872523bbff7374986E45C486`](https://saigon-app.roninchain.com/address/0xEbe57e8045F2F230872523bbff7374986E45C486) | -| Sei EVM testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://seitrace.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43?chain=atlantic-2) | -| Scroll Sepolia | [`0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c`](https://sepolia-blockscout.scroll.io/address/0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c) | -| Sepolia (Ethereum testnet) | [`0xDd24F84d36BF92C65F92307595335bdFab5Bbd21`](https://sepolia.etherscan.io/address/0xDd24F84d36BF92C65F92307595335bdFab5Bbd21) | -| Shimmer testnet | [`0x8D254a21b3C86D32F7179855531CE99164721933`](https://explorer.evm.testnet.shimmer.network/address/0x8D254a21b3C86D32F7179855531CE99164721933) | -| Skate testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://testnet.skalenodes.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Soneium (testnet) | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://soneium-minato.blockscout.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Sonic Blaze Testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://blaze.soniclabs.com/address/0x2880ab155794e7179c9ee2e38200202908c17b43) | -| Story Testnet | [`0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320`](https://aeneid.storyscan.xyz/address/0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320) | -| Superseed Testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://sepolia-explorer.superseed.xyz/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Swellchain Testnet | [`0x26DD80569a8B23768A1d80869Ed7339e07595E85`](https://swell-testnet-explorer.alt.technology/address/0x26DD80569a8B23768A1d80869Ed7339e07595E85) | -| Tabi Testnet | [`0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb`](https://testnetv2.tabiscan.com/address/0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb) | -| Taiko Hekla | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://hekla.taikoscan.network/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Unichain Sepolia | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://unichain-sepolia.blockscout.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| Viction testnet | [`0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167`](https://testnet.tomoscan.io/address/0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167) | -| WEMIX testnet | [`0x26DD80569a8B23768A1d80869Ed7339e07595E85`](https://explorer.test.wemix.com/address/0x26DD80569a8B23768A1d80869Ed7339e07595E85) | -| Worldchain testnet | [`0x2880aB155794e7179c9eE2e38200202908C17B43`](https://worldchain-sepolia.explorer.alchemy.com/address/0x2880aB155794e7179c9eE2e38200202908C17B43) | -| ZKFair testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://testnet-scan.zkfair.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | -| zetachain testnet | [`0x0708325268dF9F66270F1401206434524814508b`](https://explorer.zetachain.com/address/0x0708325268dF9F66270F1401206434524814508b) | -| zkSync Era Goerli (testnet) | [`0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1`](https://goerli.explorer.zksync.io/address/0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1) | -| zkSync Era Sepolia (testnet) | [`0x056f829183Ec806A78c26C98961678c24faB71af`](https://sepolia.explorer.zksync.io/address/0x056f829183Ec806A78c26C98961678c24faB71af) | - -Pyth is available on the following network using Pyth Beta price sources: - -| Network | Contract address | -| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| Horizen GOBI testnet | [`0xA2aa501b19aff244D90cc15a4Cf739D2725B5729`](https://gobi-explorer.horizenlabs.io/address/0xA2aa501b19aff244D90cc15a4Cf739D2725B5729) | - -## Price Feed IDs - -The price feed IDs for EVM chains are available [here](https://pyth.network/developers/price-feed-ids#pyth-evm-stable) diff --git a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/near.mdx b/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/near.mdx deleted file mode 100644 index 129cddf420..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/contract-addresses/near.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: NEAR Price Feed Contract Addresses for Mainnet & Testnet -description: >- - This resource lists the current Pyth NEAR contract addresses for mainnet and - testnet. Use them to integrate on-chain price feeds and ensure your - configuration stays up to date. -full: false -index: false ---- - -# Price Feed Contract Addresses on NEAR - -| Network | Contract address | -| ------------ | --------------------- | -| NEAR Mainnet | `pyth-oracle.near` | -| NEAR Testnet | `pyth-oracle.testnet` | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app.mdx b/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app.mdx deleted file mode 100644 index 5b28f99fbf..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Build Your First Pyth Price Feed for EVM -description: >- - Use the Pyth network to create real-time price feeds on EVM. This step-by-step - guide shows how to integrate price oracles into smart contracts and connect - off-chain code. -full: false -index: false ---- - -# Create your first Pyth app - -This tutorial walks through creating a complete application that uses Pyth Price feeds. -The application includes a smart contract and an off-chain code invoking the contract. - - -
- The tutorial is an in-depth walkthrough of contract development; more - experienced developers may want to refer to [Use Real-time Price - Data](./use-real-time-data) for a more concise version. -
-
- -Please choose your environment to get started: - -- [EVM](create-your-first-pyth-app/evm/part-1) diff --git a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/_meta.json b/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/_meta.json deleted file mode 100644 index 0f6a3b7da2..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/create-your-first-pyth-app/_meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "evm": { - "title": "on EVM", - "href": "/evm" - } -} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/error-codes.mdx b/apps/developer-hub/content/docs/price-feeds/v1/error-codes.mdx deleted file mode 100644 index 5d4decc119..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/error-codes.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Error Codes for Pyth Cross-Chain Apps: Complete List & Troubleshooting" -description: >- - List of Pyth cross-chain EVM error codes with descriptions and troubleshooting - steps. Use this reference to diagnose and resolve issues across EVM-compatible - chains. -full: false -index: false ---- - -# Error Codes - -- [EVM](error-codes/evm) diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/EMA_Price_Aggregation_1.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/EMA_Price_Aggregation_1.png deleted file mode 100644 index 392f440c82..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/EMA_Price_Aggregation_1.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/EMA_Price_Aggregation_2.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/EMA_Price_Aggregation_2.png deleted file mode 100644 index 337fdf2972..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/EMA_Price_Aggregation_2.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_1.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_1.png deleted file mode 100644 index ff595cc9e5..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_1.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_2.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_2.png deleted file mode 100644 index 55959db9f3..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_2.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_3.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_3.png deleted file mode 100644 index 92882f1bb1..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_3.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_4.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_4.png deleted file mode 100644 index 99b5088944..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_4.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_5.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_5.png deleted file mode 100644 index 484efb33d2..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_5.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_6.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_6.png deleted file mode 100644 index 175accaec4..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_6.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_7.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_7.png deleted file mode 100644 index af691fc366..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Price_Aggregation_7.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Pull-Architecture-Hermes.png b/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Pull-Architecture-Hermes.png deleted file mode 100644 index 2a0baf4481..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/how-pyth-works/assets/Pull-Architecture-Hermes.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/how-to-guides/index.mdx b/apps/developer-hub/content/docs/price-feeds/v1/how-to-guides/index.mdx deleted file mode 100644 index 53697149fe..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/how-to-guides/index.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Pyth Core Integration & Setup Guide -description: >- - The Pyth Core developer guides include step-by-step tutorials, a complete API - reference, and code examples for integration. -full: false -index: true ---- - -# Heading One - -The fastest and most reliable data powering more transactions than any other oracle. Permissionless integration on every blockchain. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/index.mdx b/apps/developer-hub/content/docs/price-feeds/v1/index.mdx deleted file mode 100644 index a174a64bf3..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/index.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Pyth Network Price Feeds: Real-Time Data on 100+ Blockchains" -description: >- - Pyth Network provides real-time price feeds for multiple assets from data - providers across 100+ blockchains. Integrate these feeds into your - applications. -full: false -index: true ---- - -# Introduction - -Pyth Network price feeds provide real-time financial market data to smart contract applications on 100+ blockchains. -Pyth's market data is contributed by over [120+ reputable first-party data providers](https://insights.pyth.network/publishers?utm_source=docs), including some of the biggest exchanges and market making firms in the world. -Each price feed publishes a [robust aggregate](price-feeds/how-pyth-works/price-aggregation) of these prices multiple times per second. -The protocol offers over [1300+ price feeds](https://pyth.network/price-feeds/) covering a number of different asset classes, including US equities, commodities, and cryptocurrencies. - -Pythnet Price Feeds are available on [100+ blockchain ecosystems](./price-feeds/contract-addresses), and can also be used in off-chain applications. -They are available on mainnet for most [EVM chains](price-feeds/use-real-time-data/evm.md) -- including Ethereum, BNB, Avalanche, and more --several [Cosmos chains](price-feeds/use-real-time-data/cosmwasm.md), [Solana](https://docs.pyth.network/price-feeds/use-real-time-data/solana), -[Aptos](price-feeds/use-real-time-data/aptos.md), [Sui](price-feeds/use-real-time-data/sui.md), [Ton](price-feeds/use-real-time-data/ton.md), and [NEAR](price-feeds/use-real-time-data/near.md). -More ecosystems are coming soon! - -Follow the [Getting Started](price-feeds/getting-started.mdx) guide to learn more about Pyth and integrate Pyth Price Feeds into your application. - -Developers may also consider using [Benchmarks](../benchmarks) to access historical Pyth prices for both on- and off-chain use. -These historical prices can be used for settlement or other similar applications. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth.mdx b/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth.mdx deleted file mode 100644 index 159b92a11d..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "Migrate to Pyth Oracle: Complete Guide for Developers" -description: >- - This guide provides step-by-step instructions to migrate real-time price feeds - from Chainlink to Pyth oracles, detailing configuration, data validation, and - performance considerations to improve price accuracy, update speed, and system - reliability. -full: false -index: false ---- - -# Migrate to Pyth from Another Oracle - -The guides in this section are designed to help developers migrate an application from another oracle to use Pyth price feeds. - -- [Chainlink](migrate-an-app-to-pyth/chainlink.md) diff --git a/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth/chainlink.md b/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth/chainlink.md deleted file mode 100644 index dea2f11d6c..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/migrate-an-app-to-pyth/chainlink.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Migrating from Chainlink to Pyth: A Step-by-Step Guide" -description: >- - Migrate your EVM app from Chainlink to Pyth with our step-by-step guide. Set - up Pyth price feeds, automate updates, and access reliable price data. -full: false -index: false ---- - -Hello diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/assets/Confidence_Interval_and_Crypto_Exchange_Fees_Table_1.png b/apps/developer-hub/content/docs/price-feeds/v1/publish-data/assets/Confidence_Interval_and_Crypto_Exchange_Fees_Table_1.png deleted file mode 100644 index ca840fc175..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/assets/Confidence_Interval_and_Crypto_Exchange_Fees_Table_1.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/assets/Confidence_Interval_and_Crypto_Exchange_Fees_Table_2.png b/apps/developer-hub/content/docs/price-feeds/v1/publish-data/assets/Confidence_Interval_and_Crypto_Exchange_Fees_Table_2.png deleted file mode 100644 index de48cd6601..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/publish-data/assets/Confidence_Interval_and_Crypto_Exchange_Fees_Table_2.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/dedicated-msg-sender.png b/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/dedicated-msg-sender.png deleted file mode 100644 index e2ec248e0c..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/dedicated-msg-sender.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/deposit-usdc.png b/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/deposit-usdc.png deleted file mode 100644 index a006d6df59..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/deposit-usdc.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/storage-pyth-config.png b/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/storage-pyth-config.png deleted file mode 100644 index a740000453..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/storage-pyth-config.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/task-creation-gist-id.png b/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/task-creation-gist-id.png deleted file mode 100644 index bc1d9ee394..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/task-creation-gist-id.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/task-execution.png b/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/task-execution.png deleted file mode 100644 index 69165169d8..0000000000 Binary files a/apps/developer-hub/content/docs/price-feeds/v1/schedule-price-updates/assets/guides/gelato/task-execution.png and /dev/null differ diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds.mdx b/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds.mdx deleted file mode 100644 index 21211b0c2a..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "Pyth Data Association Sponsored Feeds: Networks & Updates" -description: >- - Pyth Data Association provides real-time price updates across EVM, Solana, - Aptos, Sui, and Movement. It supports sponsored feeds through a simple - integration. -full: false -index: false ---- - -# Sponsored Feeds - -The Pyth Data Association sponsors price updates for some feeds on some networks. -Sponsored feeds are updated at a specific heartbeat rate or when the price changes by a specific percentage. -Developers don't need to [pull prices](./fetch-price-updates.mdx) for sponsored feeds, unless they required short update intervals. - -The sponsored feeds can vary by network. Please see the relevant section below for the network of interest. - -- [EVM](sponsored-feeds/evm) -- [Solana](sponsored-feeds/solana) -- [Aptos](sponsored-feeds/aptos) -- [Sui](sponsored-feeds/sui) -- [Movement](sponsored-feeds/movement) - - -
- DISCLAIMER: While the Pyth Data Association strives to deliver timely - updates, these sponsored feeds may occasionally experience delays in updates - caused by chain halts, gas estimations and other issues. Applications are - advised to run their own scheduler. Find out how you can run your own - scheduler [here](/price-feeds/schedule-price-updates/using-scheduler). -
-
- -If you would like to see additional feeds on this list, please fill in this [form](https://tally.so/r/nGz2jj) to signal your interest. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/aptos.mdx b/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/aptos.mdx deleted file mode 100644 index 8f4de1e811..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/aptos.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Sponsored Price Feeds on Aptos: IDs & Update Parameters" -description: >- - API access to Aptos price feeds updated every 15 seconds with a maximum - deviation of ±0.5%. Data is sponsored to ensure consistent availability for - market monitoring and trading applications. -full: false -index: false ---- - -# Sponsored Feeds on Aptos - -The price feeds listed in the table below are currently sponsored in **Aptos mainnet**. - -Update Parameters: **15 second heartbeat or 0.5% price deviation** - -| Name | Price Feed Id | -| --------------- | ------------------------------------------------------------------ | -| APT/USD | `03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5` | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| SOL/USD | `ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d` | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| CAKE/USD | `2356af9529a1064d41e32d617e2ce1dca5733afa901daba9e2b68dee5d53ecf9` | -| SUI/USD | `23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744` | -| CETUS/USD | `e5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef` | -| BNB/USD | `2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f` | -| WBTC/USD | `c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33` | -| THL/USD | `74e3fbb0d33e0ed8c0078b56134dcebdae38852f0858a8ea4de4c5ea7474bd42` | -| USDY/USD | `e393449f6aff8a4b6d3e1165a7c9ebec103685f3b41e60db4277b5b6d10e7326` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| THAPT/USD | `b29276972267db5d64ae718fb7f107ad9e72a79cabf9992f0e9bc75ad451a7f6` | -| STONE/USD | `4dcc2fb96fb89a802ef9712f6bd2246d3607cf95ca5540cb24490d37003f8c46` | -| MOD/USD | `9a2a116d85a31d6f1bed19771105557276457094e31791a892758148aa54023d` | -| SUSDE/USD | `ca3ba9a619a4b3755c10ac7d5e760275aa95e9823d38a84fedd416856cdba37c` | -| USDE/USD | `6ec879b1e9963de5ee97e9c8710b742d6228252a5e2ca12d4ae81d7fe5ee8c5d` | -| STHAPT/THAPT.RR | `ea07fce25d7d716fe6ad10b267451011baadc8f3724b28487026072ddce3ba1b` | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/evm.mdx b/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/evm.mdx deleted file mode 100644 index 3e3ba566d2..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/evm.mdx +++ /dev/null @@ -1,275 +0,0 @@ ---- -title: "Pyth EVM Sponsored Feeds: Asset Pairs & Hashes" -description: >- - Streamline DApp development with sponsored EVM price feeds on Ethereum, Base, - and Berachain. Access feed IDs and update parameters for seamless integration. -full: false -index: false ---- - -# Sponsored Feeds on EVM - -The following EVM chains have sponsored price feeds: - -- [Ethereum Mainnet](#ethereum-mainnet) -- [Base Mainnet](#base-mainnet) -- [Berachain Mainnet](#berachain-mainnet) -- [HyperEVM Mainnet](#hyperevm-mainnet) -- [Kraken Mainnet](#kraken-mainnet) -- [Unichain Mainnet](#unichain-mainnet) -- [Mode Mainnet](#mode-mainnet) -- [Sonic Mainnet](#sonic-mainnet) -- [Story Mainnet](#story-mainnet) -- [Optimism Sepolia](#optimism-sepolia) -- [Unichain Sepolia](#unichain-sepolia) -- [Ble Testnet](#ble-testnet) - -## Ethereum Mainnet - -The price feeds listed in the table below are currently sponsored in **Ethereum mainnet**. - -Update Parameters: **1 hour heartbeat or 2% price deviation** - -| Name | Price Feed Id | -| ---------- | ------------------------------------------------------------------ | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| UNI/USD | `78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501` | -| PYTH/USD | `0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff` | -| USR/USD | `10b013adec14c0fe839ca0fe54cec9e4d0b6c1585ac6d7e70010dac015e57f9c` | -| WSTUSR/USR | `b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706` | -| USDTB/NAV | `967549f1ff4869f41cb354a7116b9e5a9a3091bebe0b2640eeed745ca1f7f90b` | - -## Base Mainnet - -The price feeds listed in the table below are currently sponsored in **Base mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ---------- | ------------------------------------------------------------------ | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| PUFETH/USD | `e5801530292c348f322b7b4a48c1c0d59ab629846cce1c816fc27aee2054b560` | -| WEETH/USD | `9ee4e7c60b940440a261eb54b6d8149c23b580ed7da3139f7f08f4ea29dad395` | -| EZETH/USD | `06c217a791f5c4f988b36629af4cb88fad827b2485400a358f3b02886b54de92` | -| CBETH/USD | `15ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce5717` | -| WSTETH/USD | `6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784` | -| RSETH/USD | `0caec284d34d836ca325cf7b3256c078c597bc052fbd3c0283d52b581d68d71f` | -| PYTH/USD | `0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff` | -| SUI/USD | `23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744` | -| XRP/USD | `ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8` | -| USR/USD | `10b013adec14c0fe839ca0fe54cec9e4d0b6c1585ac6d7e70010dac015e57f9c` | -| USR/USD.RR | `512a79cc65f49531f0bbb72956353e79ecdc1e4a6e5241847196c1f9a11d8a52` | -| RLP/USD | `7265d5cf8ee0e7b5266f75ff19c42c5b7697a9756c9304aa78b6be4fbb8d823d` | -| RLP/USD.RR | `796bcb684fdfbba2b071c165251511ab61f08c8949afd9e05665a26f69d9a839` | - -## Berachain Mainnet - -The price feeds listed in the table below are currently sponsored in **Berachain mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| --------------------- | ------------------------------------------------------------------ | -| BERA/USD | `962088abcfdbdb6e30db2e340c8cf887d9efb311b1f2f17b155a63dbb6d40265` | -| BERASTONE/USD | `950fe827fa92b73e81cd49043673e9132a8424b24e35989156606073f2385e21` | -| BERASTONE/ETH.RR | `b8004b055f64f9e13468e0bff616bb87232c241a962cdf87c7a781ec31194803` | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| LIQUIDBERABTC/WBTC.RR | `c869104c9feab6b6b303add2d48fa7443fc119493f8d8cafd4df23890659ed78` | -| LIQUIDBERAETH/ETH.RR | `bedaf537ab909117259282b9463b0f54d67dd575d64dcd564bfbdbfc0f57f99d` | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| PYUSD/USD | `c1da1b73d7f01e7ddd54b3766cf7fcd644395ad14f70aa706ec5384c59e76692` | -| SUSDE/USDE.RR | `271c64ce459937abf721d42552035713b6c58f80eeceab716a624607fda4b10f` | -| HONEY/USD | `f67b033925d73d43ba4401e00308d9b0f26ab4fbd1250e8b5407b9eaade7e1f4` | -| RSETH/USD | `0caec284d34d836ca325cf7b3256c078c597bc052fbd3c0283d52b581d68d71f` | -| RSETH/ETH.RR | `56e9b5eb08e62dd4b445f29e4ec7d3b3d49617d64f2d331d36a2101d4904e3c4` | -| IBGT/USD | `c929105a1af143cbfc887c4573947f54422a9ca88a9e622d151b8abdf5c2962f` | -| STBGT/USD | `ffd5448b844f5e7eeafbf36c47c7d4791a3cb86f5cefe02a7ba7864b22d81137` | -| HENLO/USD | `d90813d7fc7f4f5d786f3a6a35701aff4f628db0ecd998de66be0ff8264c67a2` | -| IBERA/USD | `eb943c0b5c9e02a529f799ac91070c3b7046f9412f3e5b0a90ba00267b838f34` | -| NECT/USD | `ddf0dd319060db4561b5aa8f84a94816d33579f8dc2af2d8f74583bce20cd260` | -| HONEY/USD.RR | `8bb3695875f9c33594097b0e0a1daa881aa81290088f0eac3a07b700fc7612ba` | - -## HyperEVM Mainnet - -The price feeds listed in the table below are currently sponsored in **HyperEVM mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ----------------- | ------------------------------------------------------------------ | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| HYPE/USD | `4279e31cc369bbcc2faf022b382b080e32a8e689ff20fbc530d2a603eb6cd98b` | -| HFUN/USD | `61db931fcfd322223fb84dc4bfc9c6481bd5610a31403782bc396df213e3ce12` | -| PURR/USD | `e0154bf4dfbcf835fad3428c0d8c1078b83f687e4d6afafb827f7f9af70ec326` | -| SOL/USD | `ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d` | -| WSTETH/USD | `6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784` | -| WSTETH/STETH.RR | `f59ead01ed0faba85332a1e2feae8ddb14a1c94ebac259f1c982c92fc7ce333e` | -| WEETH/USD | `9ee4e7c60b940440a261eb54b6d8149c23b580ed7da3139f7f08f4ea29dad395` | -| WEETH/EETH.RR | `343558e79f587e098c321218ecb34d031ba709ab3e84133126f3c98511b91f64` | -| LBTC/USD | `8f257aab6e7698bb92b15511915e593d6f8eae914452f781874754b03d0c612b` | -| LBTC/BTC.RR | `bade5c63f281d36a13dbb64ed0ae1c532a434b6771b11885f396a41f56cc3bd0` | -| CBBTC/USD | `2817d7bfe5c64b8ea956e9a26f573ef64e72e4d7891f2d6af9bcc93f7aff9a97` | -| WBTC/USD | `c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| USDE/USD | `6ec879b1e9963de5ee97e9c8710b742d6228252a5e2ca12d4ae81d7fe5ee8c5d` | -| SUSDE/USD | `ca3ba9a619a4b3755c10ac7d5e760275aa95e9823d38a84fedd416856cdba37c` | -| SUSDE/USDE.RR | `271c64ce459937abf721d42552035713b6c58f80eeceab716a624607fda4b10f` | -| WSTHYPE/STHYPE.RR | `1a78b5829a99f1d2897917dae2a02266c0210535a995a2e9d0692613bbc89e27` | -| LHYPE/USD | `9e3cadc2a8a0ebfd765b34d5ee5de77a4add3114672fc0b8d3ad09ac56940069` | -| FHYPE/HYPE.RR | `8f749681c078ce4ef65cd220994f25735b80264fca4386dd57b31eacf7e4610b` | -| USDXL/USD | `e10593860e9ee1c204e4f9569e877502f098dd1a4d84cc5bad06f23f77dcbfe2` | -| MHYPE/HYPE.RR | `e35aebd2d35795acaa2b0e59f3b498510e8ef334986d151d1502adb9e26234f7` | -| FEUSD/USD | `7f2e9a7365eb634c543e9ca72683a9cf778cdc16ee5b8bca73abe6d08c1410d5` | -| MHYPE/USD | `a7fb4cdafed5130e8731b8da7c9208881f24e9b671bb92438b1fbf361d578112` | -| STHYPE/USD | `068cd0617cbdd1dda615ed2b5ab4fe07d2e9f46347f5e785484844aa10d22dc5` | -| UETH/USD | `08c73e187b45ecb2ab8375b975865d3c4a225fef1ccc7f326ad6eec66a24567a` | -| UBTC/USD | `42bfb26778f3504a9f359a92c731f77d0c24aed9b7745276e3ad0c2d840b74c2` | -| CMETH/METH.RR | `cef5ad3be493afef85e77267cb0c07d048f3d54055409a34782996607e48cf0a` | -| METH/ETH.RR | `ee279eeb2fec830e3f535ad4d6524eb35eb1c6890cb1afc0b64554d08c88727e` | - -## Kraken Mainnet - -The price feeds listed in the table below are currently sponsored in **Kraken mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ----------- | ------------------------------------------------------------------ | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| WSTETH/USD | `6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784` | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| KBTC/BTC.RR | `5dd5ede8b038c39f015746942820595ed69f30c00c3d3700f01d9ec55e027700` | - -## Unichain Mainnet - -The price feeds listed in the table below are currently sponsored in **Unichain mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| -------- | ------------------------------------------------------------------ | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| UNI/USD | `78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501` | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| PYTH/USD | `0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff` | - -## Mode Mainnet - -The price feeds listed in the table below are currently sponsored in **Mode mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ---------- | ------------------------------------------------------------------ | -| wUSDM/USDM | `3d392a0fc3ae7fac4d6ba15e99a4c2bec2debbe1c9fc7d950ec0972ee716f559` | -| USDM/USD | `a6a0dfa49b6b3a93510658245618099f5e842514970f596cf64fad9e0d658193` | -| STONE/ETH | `7a508a94c9276cbc60d04e1a8cf839d20d835bb869a74487dfffa8f1bfd1ce42` | - -## Sonic Mainnet - -The price feeds listed in the table below are currently sponsored in **Sonic mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ------------------ | ------------------------------------------------------------------ | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| WBTC/USD | `c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33` | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| S/USD | `f490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d` | -| SCUSD/USD | `316b1536978bee10c47b3c74c0b3995aabae973a3351621680a2aa383aca77b8` | -| SCETH/USD | `8bb5e69ed1ab19642a0e7e851b1ed7b3579d0548bc8ddd1077b0d9476bb1dabc` | -| WSTKSCETH/SCETH.RR | `b680422b70915df562e4802bd8679112ff0f6b0a29ec2c3762ae2720eda01e58` | -| WSTKSCUSD/SCUSD.RR | `caed0964240861da425cf03fae9737473f6f031fb80cbbd73c3fb8cddd7a2204` | -| STS/S.RR | `3b14bd355f182fa3a3feeea6824228e1f71e7c221a37bc91e8307280aee6a803` | -| ANON/USD | `7a36855b8a4a6efd701ed82688694bbf67602de9faae509ae28f91065013cb82` | -| OS/USD | `2bcd65e3c1b4580a5f59755ef30e11077238217dd418d301dd7ee4d252987675` | -| GOGLZ/USD | `82465d1155ddbb2c73bf3491457163000f8e8d02dea90c548b1b7e56ae9fe4b1` | -| SHADOW/USD | `6f02ad2b8a307411fc3baedb9876e83efe9fa9f5b752aab8c99f4742c9e5f5d5` | -| WANS/ANS.RR | `940b0948d828c46bff5fc3a3204fc032092b5b4239ef9364f33e01d37437ba65` | -| STS/USD | `19f463beb47cb398cf2e2c8037f1d0073583cf18209c91a636f051d755ce0662` | - -## Story Mainnet - -The price feeds listed in the table below are currently sponsored in **Story mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ---------- | ------------------------------------------------------------------ | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| WBTC/USD | `c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33` | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| IP/USD | `b620ba83044577029da7e4ded7a2abccf8e6afc2a0d4d26d89ccdd39ec109025` | -| STIP/IP.RR | `1997bb9bdde99431e222562f1d659c901a075fbf82502a8155d96fb2c7e33991` | -| VIP/IP.RR | `34471f3bcaecba4cf2b6f25bc6c365216869add332d0ed2e88e542e3a3bcc2c7` | - -## Optimism Sepolia - -The price feeds listed in the table below are currently sponsored in **Optimism Sepolia**. - -Update Parameters: **30 seconds heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| -------- | ------------------------------------------------------------------ | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | - -## Unichain Sepolia - -The price feeds listed in the table below are currently sponsored in **Unichain Sepolia**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ---------- | ------------------------------------------------------------------ | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| STETH/USD | `3af6a3098c56f58ff47cc46dee4a5b1910e5c157f7f0b665952445867470d61f` | -| UNI/USD | `78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501` | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| WSTETH/USD | `6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784` | -| WETH/USD | `9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6` | -| AVAX/USD | `93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7` | -| POL/USD | `ffd11c5a1cfd42f80afb2df4d9f264c15f956d68153335374ec10722edd70472` | -| DOGE/USD | `dcef50dd0a4cd2dcc17e45df1676dcb336a11a61c69df7a0299b0150c672d25c` | -| SHIB/USD | `f0d57deca57b3da2fe63a493f4c25925fdfd8edf834b20f93e1f84dbd1504d4a` | -| DAI/USD | `b0948a5e5313200c632b51bb5ca32f6de0d36e9950a942d19751e833f70dabfd` | -| OP/USD | `385f64d993f7b77d8182ed5003d97c60aa3361f3cecfe711544d2d59165e9bdf` | -| PYTH/USD | `0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff` | - -## Ble Testnet - -The price feeds listed in the table below are currently sponsored in **Ble Testnet**. - -Update Parameters: **30 seconds heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| ---------- | ------------------------------------------------------------------ | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| ETH/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| USDE/USD | `3af6a3098c56f58ff47cc46dee4a5b1910e5c157f7f0b665952445867470d61f` | -| SUSDE/USD | `78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501` | -| ENA/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| SUSDE/USDE | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| USDTB/NAV | `967549f1ff4869f41cb354a7116b9e5a9a3091bebe0b2640eeed745ca1f7f90b` | -| USDTB/USD | `e4731214382d8ed70a766930a7722c68064fc7ed4e6d70dbce3c84d4be81bc92` | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/movement.mdx b/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/movement.mdx deleted file mode 100644 index 9f7a00b057..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/movement.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Sponsored Price Feeds on Movement Mainnet: Key Updates" -description: >- - Movement mainnet provides on-chain sponsored price feeds with hourly updates - and a 1% deviation threshold. See the full list of available feeds. -full: false -index: false ---- - -# Sponsored Feeds on Movement - -The price feeds listed in the table below are currently sponsored in **Movement mainnet**. - -Update Parameters: **1 hour heartbeat or 1% price deviation** - -| Name | Price Feed Id | -| --------------- | ---------------------------------------------------------------- | -| MOVE/USD | 6bf748c908767baa762a1563d454ebec2d5108f8ee36d806aadacc8f0a075b6d | -| APT/USD | 03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5 | -| USDC/USD | eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a | -| USDT/USD | 2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b | -| SUSDE/USD | ca3ba9a619a4b3755c10ac7d5e760275aa95e9823d38a84fedd416856cdba37c | -| WETH/USD | 9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6 | -| MOD/USD | 9a2a116d85a31d6f1bed19771105557276457094e31791a892758148aa54023d | -| THAPT/USD | b29276972267db5d64ae718fb7f107ad9e72a79cabf9992f0e9bc75ad451a7f6 | -| STHAPT/APT.RR | ea07fce25d7d716fe6ad10b267451011baadc8f3724b28487026072ddce3ba1b | -| FRAX/USD | c3d5d8d6d17081b3d0bbca6e2fa3a6704bb9a9561d9f9e1dc52db47629f862ad | -| LBTC/USD | 8f257aab6e7698bb92b15511915e593d6f8eae914452f781874754b03d0c612b | -| LBTC/BTC.RR | bade5c63f281d36a13dbb64ed0ae1c532a434b6771b11885f396a41f56cc3bd0 | -| ETH/USD | ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace | -| BTC/USD | e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43 | -| WBTC/USD | c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33 | -| AVALON.USDA/USD | 37c307959acbb353e1451bcf7da9d305c8cb8d54c64353588aaf900ffcffdd7d | -| WSTETH/USD | 6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784 | -| SOLVBTC/USD | f253cf87dc7d5ed5aa14cba5a6e79aee8bcfaef885a0e1b807035a0bbecc36fa | -| WEETH/USD | 9ee4e7c60b940440a261eb54b6d8149c23b580ed7da3139f7f08f4ea29dad395 | -| WEETH/ETH.RR | 343558e79f587e098c321218ecb34d031ba709ab3e84133126f3c98511b91f64 | -| EZETH/USD | 06c217a791f5c4f988b36629af4cb88fad827b2485400a358f3b02886b54de92 | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/solana.mdx b/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/solana.mdx deleted file mode 100644 index fc8fbd022d..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/solana.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Sponsored Price Feeds on Solana: Assets, Accounts & Parameters" -description: >- - Access Solana’s sponsored price feeds: get mainnet & devnet configurations, - account addresses, update parameters, and essential asset feed IDs. -full: false -index: false ---- - -# Sponsored Feeds on Solana - -The price feeds listed in the table below are currently sponsored in **Solana mainnet and devnet**. - -Update Parameters for BTC, WBTC, SOL, JITOSOL , BONK and USDC: **60 seconds heartbeat or 0.02% price deviation** - -Update Parameters for other assets: **60 seconds heartbeat or 0.5% price deviation** - -The addresses represent the price feed account for shard 0 of the relevant price feed id: - -| Name | Account Address | Price Feed Id | -| ------------ | ---------------------------------------------- | ------------------------------------------------------------------ | -| SOL/USD | `7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE` | `ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d` | -| JITOSOL/USD | `AxaxyeDT8JnWERSaTKvFXvPKkEdxnamKSqpWbsSjYg1g` | `67be9f519b95cf24338801051f9a808eff0a578ccb388db73b7f6fe1de019ffb` | -| MSOL/USD | `5CKzb9j4ChgLUt8Gfm5CNGLN6khXKiqMbnGAW4cgXgxK` | `c2289a6a43d2ce91c6f55caec370f4acc38a2ed477f58813334c6d03749ff2a4` | -| BSOL/USD | `5cN76Xm2Dtx9MnrQqBDeZZRsWruTTcw37UruznAdSvvE` | `89875379e70f8fbadc17aef315adf3a8d5d160b811435537e03c97e8aac97d9c` | -| SSOL/SOL | `2doCYXwYNt2FhzfCdgpW4YAwczvdzB27xtJkzQd5Kre2` | `add6499a420f809bbebc0b22fbf68acb8c119023897f6ea801688e0d6e391af4` | -| BONK/USD | `DBE3N8uNjhKPRHfANdwGvCZghWXyLPdqdSbEW2XFwBiX` | `72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419` | -| W/USD | `BEMsCSQEGi2kwPA4mKnGjxnreijhMki7L4eeb96ypzF9` | `eff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389` | -| KMNO/USD | `ArjngUHXrQPr1wH9Bqrji9hdDQirM6ijbzc1Jj1fXUk7` | `b17e5bc5de742a8a378b54c9c75442b7d51e30ada63f28d9bd28d3c0e26511a0` | -| MEW/USD | `EF6U755BdHMXim8RBw6XSC6Yk6XaouTKpwcBZ7QkcanB` | `514aed52ca5294177f20187ae883cec4a018619772ddce41efcc36a6448f5d5d` | -| TNSR/USD | `9TSGDwcPQX4JpAvZbu2Wp5b68wSYkQvHCvfeBjYcCyC` | `05ecd4597cd48fe13d6cc3596c62af4f9675aee06e2e0b94c06d8bee2b659e05` | -| USDC/USD | `Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX` | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | -| BTC/USD | `4cSM2e6rvbGQUFiJbqytoVMi5GgghSMr8LwVrT9VPSPo` | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | -| JTO/USD | `7ajR2zA4MGMMTqRAVjghTKqPPn4kbrj3pYkAVRVwTGzP` | `b43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2` | -| USDT/USD | `HT2PLQBcG5EiCcNSaMHAjSgd9F98ecpATbk4Sk5oYuM` | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | -| JUP/USD | `7dbob1psH1iZBS7qPsm3Kwbf5DzSXK8Jyg31CTgTnxH5` | `0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996` | -| ETH/USD | `42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC` | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | -| PYTH/USD | `8vjchtMuJNY4oFQdTi8yCe6mhCaNBFaUbktT482TpLPS` | `0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff` | -| HNT/USD | `4DdmDswskDxXGpwHrXUfn2CNUm9rt21ac79GHNTN3J33` | `649fdd7ec08e8e2a20f425729854e90293dcbe2376abc47197a14da6ff339756` | -| RENDER/USD | `HAm5DZhrgrWa12heKSxocQRyJWGCtXegC77hFQ8F5QTH` | `3d4a2bd9535be6ce8059d75eadeba507b043257321aa544717c56fa19b49e35d` | -| ORCA/USD | `4CBshVeNBEXz24GZpoj8SrqP5L7VGG3qjGd6tCST1pND` | `37505261e557e251290b8c8899453064e8d760ed5c65a779726f2490980da74c` | -| SAMO/USD | `2eUVzcYccqXzsDU1iBuatUaDCbRKBjegEaPPeChzfocG` | `49601625e1a342c1f90c3fe6a03ae0251991a1d76e480d2741524c29037be28a` | -| WIF/USD | `6B23K3tkb51vLZA14jcEQVCA1pfHptzEHFA93V5dYwbT` | `4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc` | -| LST/USD | `7aT9A5knp62jVvnEW33xaWopaPHa3Y7ggULyYiUsDhu8` | `12fb674ee496045b1d9cf7d5e65379acb026133c2ad69f3ed996fb9fe68e3a37` | -| INF/USD | `Ceg5oePJv1a6RR541qKeQaTepvERA3i8SvyueX9tT8Sq` | `f51570985c642c49c2d6e50156390fdba80bb6d5f7fa389d2f012ced4f7d208f` | -| PRCL/USD | `6a9HN13ZFf57WZd4msn85KWLe5iTayqS8Ee8gstQkxqm` | `5bbd1ce617792b476c55991c27cdfd89794f9f13356babc9c92405f5f0079683` | -| RAY/USD | `Hhipna3EoWR7u8pDruUg8RxhP5F6XLh6SEHMVDmZhWi8` | `91568baa8beb53db23eb3fb7f22c6e8bd303d103919e19733f2bb642d3e7987a` | -| FIDA/USD | `2cfmeuVBf7bvBJcjKBQgAwfvpUvdZV7K8NZxUEuccrub` | `c80657b7f6f3eac27218d09d5a4e54e47b25768d9f5e10ac15fe2cf900881400` | -| MNDE/USD | `GHKcxocPyzSjy7tWApQjKRkDNuVXd4Kk624zhuaR7xhC` | `3607bf4d7b78666bd3736c7aacaf2fd2bc56caa8667d3224971ebe3c0623292a` | -| MOBILE/USD | `DQ4C1tzvu28cwo1roN1Wm6TW35sfJEjLh517k3ZeWevx` | `ff4c53361e36a9b837433c87d290c229e1f01aec5ef98d9f3f70953a20a629ce` | -| IOT/USD | `8UYEn5Weq7toHwgcmctvcAxaNJo3SJxXEayM57rpoXr9` | `6b701e292e0836d18a5904a08fe94534f9ab5c3d4ff37dc02c74dd0f4901944d` | -| NEON/USD | `F2VfCymdNQiCa8Vyg5E7BwEv9UPwfm8cVN6eqQLqXiGo` | `d82183dd487bef3208a227bb25d748930db58862c5121198e723ed0976eb92b7` | -| AUD/USD | `6pPXqXcgFFoLEcXfedWJy3ypNZVJ1F3mgipaDFsvZ1co` | `67a6f93030420c1c9e3fe37c1ab6b77966af82f995944a9fefce357a22854a80` | -| GBP/USD | `G25Tm7UkVruTJ7mcbCxFm45XGWwsH72nJKNGcHEQw1tU` | `84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1` | -| EUR/USD | `Fu76ChamBDjE8UuGLV6GP2AcPPSU6gjhkNhAyuoPm7ny` | `a995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b` | -| XAG/USD | `H9JxsWwtDZxjSL6m7cdCVsWibj3JBMD9sxqLjadoZnot` | `f2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e` | -| XAU/USD | `2uPQGpm8X4ZkxMHxrAW1QuhXcse1AHEgPih6Xp9NuEWW` | `765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2` | -| INJ/USD | `GwXYEfmPdgHcowF9GZwbb1WiTGTn1fuT3hbSLneoBKK6` | `7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff592` | -| SLND/USD | `6vPfd6612huknxXaDapfj6cVmB8NvCwKm3BHKFxzo1EZ` | `f8d030e4ef460b91ad23eabbbb27aec463e3c30ecc8d5c4b71e92f54a36ccdbd` | -| WEN/USD | `CsG7wXoqZKNxx4UnFtvozfwXQ9RgpKe7zSJa4LWh5MT9` | `5169491cd7e2a44c98353b779d5eb612e4ac32e073f5cc534303d86307c2f1bc` | -| BLZE/USD | `FFv5yoCGhEgWv6mXhwv4KX8A2dYcVAzi88a6Yu8Tf3iB` | `93c3def9b169f49eed14c9d73ed0e942c666cf0e1290657ec82038ebb792c2a8` | -| JLP/USD | `2TTGSRSezqFzeLUH8JwRUbtN66XLLaymfYsWRTMjfiMw` | `c811abc82b4bad1f9bd711a2773ccaa935b03ecef974236942cec5e0eb845a3a` | -| WBTC/USD | `9gNX5vguzarZZPjTnE1hWze3s6UsZ7dsU3UnAmKPnMHG` | `c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33` | -| PENGU/USD | `27zzC5wXCeZeuJ3h9uAJzV5tGn6r5Tzo98S1ZceYKEb8` | `bed3097008b9b5e3c93bec20be79cb43986b85a996475589351a21e67bae9b61` | -| AI16Z/USD | `BxizdE1Rd9yeCXUaorGNGLc4qHbqBULxiBtjRX37HjSV` | `2551eca7784671173def2c41e6f3e51e11cd87494863f1d208fdd8c64a1f85ae` | -| TRUMP/USD | `9vNb2tQoZ8bB4vzMbQLWViGwNaDJVtct13AGgno1wazp` | `879551021853eec7a7dc827578e8e69da7e4fa8148339aa0d3d5296405be4b1a` | -| FARTCOIN/USD | `2t8eUbYKjidMs3uSeYM9jXM9uudYZwGkSeTB4TKjmvnC` | `58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608` | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/sui.mdx b/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/sui.mdx deleted file mode 100644 index 91987b826a..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/sponsored-feeds/sui.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "Sponsored Price Feeds on Sui Mainnet: Essential Parameters & Updates" -description: >- - Unlock Sui-sponsored BTC, ARB, and SUI price feeds with detailed heartbeat - intervals, price deviation thresholds, and update mechanisms for accurate, - real-time data. -full: false -index: false ---- - -# Sponsored Feeds on Sui - -The price feeds listed in the table below are currently sponsored in **Sui mainnet**. - -| Name | Price Feed Id | Update Parameters | -| ---------- | ------------------------------------------------------------------ | --------------------------------------------------- | -| BTC/USD | `e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43` | **3** seconds heartbeat / **0.5%** price deviation | -| ARB/USD | `ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` | **3** seconds heartbeat / **0.5%** price deviation | -| SUI/USD | `23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744` | **3** seconds heartbeat / **0.5%** price deviation | -| SOL/USD | `ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d` | **3** seconds heartbeat / **0.5%** price deviation | -| ARB/USD | `3fa4252848f9f0a1480be62745a4629d9eb1322aebab8a791e344b3b9c1adcf5` | **15** seconds heartbeat / **0.5%** price deviation | -| APT/USD | `03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5` | **15** seconds heartbeat / **0.5%** price deviation | -| SEI/USD | `53614f1cb0c031d4af66c04cb9c756234adad0e1cee85303795091499a4084eb` | **15** seconds heartbeat / **0.5%** price deviation | -| AVAX/USD | `93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7` | **15** seconds heartbeat / **0.5%** price deviation | -| TIA/USD | `09f7c1d7dfbb7df2b8fe3d3d87ee94a2259d212da4f30c1f0540d066dfa44723` | **15** seconds heartbeat / **0.5%** price deviation | -| POL/USD | `ffd11c5a1cfd42f80afb2df4d9f264c15f956d68153335374ec10722edd70472` | **15** seconds heartbeat / **0.5%** price deviation | -| BLUE/USD | `04cfeb7b143eb9c48e9b074125c1a3447b85f59c31164dc20c1beaa6f21f2b6b` | **15** seconds heartbeat / **0.5%** price deviation | -| DEEP/USD | `29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff` | **15** seconds heartbeat / **0.5%** price deviation | -| SEND/USD | `7d19b607c945f7edf3a444289c86f7b58dcd8b18df82deadf925074807c99b59` | **15** seconds heartbeat / **0.5%** price deviation | -| USDC/USD | `eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a` | **15** seconds heartbeat / **0.5%** price deviation | -| USDT/USD | `2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b` | **15** seconds heartbeat / **0.5%** price deviation | -| AUSD/USD | `d9912df360b5b7f21a122f15bdd5e27f62ce5e72bd316c291f7c86620e07fb2a` | **15** seconds heartbeat / **0.5%** price deviation | -| AFSUI/USD | `17cd845b16e874485b2684f8b8d1517d744105dbb904eec30222717f4bc9ee0d` | **15** seconds heartbeat / **0.5%** price deviation | -| HASUI/USD | `6120ffcf96395c70aa77e72dcb900bf9d40dccab228efca59a17b90ce423d5e8` | **15** seconds heartbeat / **0.5%** price deviation | -| VSUI/USD | `57ff7100a282e4af0c91154679c5dae2e5dcacb93fd467ea9cb7e58afdcfde27` | **15** seconds heartbeat / **0.5%** price deviation | -| NAVX/USD | `88250f854c019ef4f88a5c073d52a18bb1c6ac437033f5932cd017d24917ab46` | **15** seconds heartbeat / **0.5%** price deviation | -| SCA/USD | `7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc` | **15** seconds heartbeat / **0.5%** price deviation | -| USDY/USD | `e393449f6aff8a4b6d3e1165a7c9ebec103685f3b41e60db4277b5b6d10e7326` | **15** seconds heartbeat / **0.5%** price deviation | -| FUD/USD | `6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75` | **15** seconds heartbeat / **0.5%** price deviation | -| BUCK/USD | `fdf28a46570252b25fd31cb257973f865afc5ca2f320439e45d95e0394bc7382` | **15** seconds heartbeat / **0.5%** price deviation | -| CETUS/USD | `e5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef` | **15** seconds heartbeat / **0.5%** price deviation | -| HAEDAL/USD | `e67d98cc1fbd94f569d5ba6c3c3c759eb3ffc5d2b28e64538a53ae13efad8fd1` | **15** seconds heartbeat / **0.5%** price deviation | diff --git a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/_meta.json b/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/_meta.json deleted file mode 100644 index c7e8d83301..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/troubleshoot/_meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "evm": "EVM Price Feeds Contract", - "svm": "SVM Price Feeds Contract" -} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-pyth-for-morpho.mdx b/apps/developer-hub/content/docs/price-feeds/v1/use-pyth-for-morpho.mdx deleted file mode 100644 index f3dec4f5b2..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-pyth-for-morpho.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "Use Pyth for Morpho: Deployment & Update Guide" -description: >- - Step-by-step guide to deploy Pyth’s Chainlink-compatible PythAggregatorV3 - contract, automate price updates, and integrate with Morpho for seamless - oracle deployment. -full: false -index: false ---- - -import { Steps, Step } from "fumadocs-ui/components/steps"; - -# How to use Pyth for Morpho Markets - -This guide will show how you can leverage Pyth real time price data to power Morpho markets. - -At the time of writing, Morpho supports an [oracle interface](https://github.com/morpho-org/morpho-blue-oracles/tree/main/src) similar to [ChainlinkAggregatorV3Interface](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol). -We need to wrap the Pyth oracle with this interface to use it with Morpho. - -There are three steps to use Pyth price feeds for Morpho markets: - -1. Deploy the [`PythAggregatorV3`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/PythAggregatorV3.sol) contract to provide a Chainlink-compatible feed interface. -2. Run the price pusher or scheduler. -3. Deploy the Morpho oracle contract. - - - - -### Deploy the `PythAggregatorV3` contract - -Pyth provides a wrapper called `PythAggregatorV3` that implements the ChainlinkAggregatorV3Interface. -This wrapper allows you to use Pyth price feeds with Morpho markets. -[Migrate from Chainlink to Pyth](./migrate-an-app-to-pyth/chainlink.md) explains how to deploy the `PythAggregatorV3` contract. - -You can use the forge [script](https://github.com/pyth-network/pyth-examples/blob/main/price_feeds/evm/chainlink_migration/script/PythAggregatorV3Deployment.s.sol) from the [pyth-examples](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/evm/chainlink_migration) directory to deploy the `PythAggregatorV3` contract. - -```bash copy -forge script script/PythAggregatorV3Deployment.s.sol --rpc-url $RPC_URL --broadcast --verify -``` - -This script will deploy the `PythAggregatorV3` contract and verify it on the target chain. -You have to run the script for both `BASE` and `QUOTE` price feeds. - - - - -### Run the price pusher or scheduler - -As a pull oracle, Pyth's users are typically responsible for updating the state of on-chain feeds. -Please see [What is a Pull Oracle?](/price-feeds/pull-updates) to learn more about pull updates. - -If you are using the `PythAggregatorV3` contract, you must push price updates to the contract at regular intervals. -The Pyth Data Association sponsors regular on-chain updates for some price feeds. -See [Sponsored Feeds](./sponsored-feeds.mdx) for the current list of feeds and their update parameters. - -If you don't find relevant price IDs in the [Sponsored Feeds](./sponsored-feeds.mdx) list, you can run the scheduler/price pusher for the price feed you need. - -Please see [Schedule Price Updates](./schedule-price-updates.mdx) for more information on how to schedule price updates. - - - - -### Deploy the Morpho oracle contract - -After deploying the `PythAggregatorV3` contract and scheduling price updates, you can deploy the Morpho oracle contract with the address of the `PythAggregatorV3` contract deployed in the first step. - -Please refer to the [Morpho documentation](https://docs.morpho.org/morpho/tutorials/deploy-an-oracle/) for more information on how to deploy the Morpho oracle contract. - - - - diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data.mdx b/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data.mdx deleted file mode 100644 index 3959cc4ae0..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Integrate Pyth Real-Time Data on Blockchains & Off-Chain -description: >- - Integrate Pyth real-time data into blockchain and off-chain applications. - Includes detailed guides, contract addresses, and deployment best practices. -full: false -index: false ---- - -# How to Use Real-Time Price Data - -The following guides demonstrate how to consume Pyth real-time prices on various blockchains. -These guides are intended for developers building on-chain applications that need price data, i.e., the price data must -be on the blockchain. - -Pyth price feeds are available on 40+ blockchain ecosystems. -Check out the complete list of chains and implementation contract addresses at [Contract Addresses](contract-addresses). - -If your blockchain is not supported, please [ask in Discord](https://discord.gg/invite/PythNetwork). -Then, consult the relevant ecosystem guide to get started using Pyth real-time price data: - -- [EVM](use-real-time-data/evm) -- [Solana](use-real-time-data/solana) -- [Aptos](use-real-time-data/aptos.md) -- [CosmWasm](use-real-time-data/cosmwasm.md) -- [Sui](use-real-time-data/sui.md) -- [IOTA](use-real-time-data/iota.md) -- [Near](use-real-time-data/sui.md) - -Pyth price feeds can also be used in off-chain applications. -For example, an application may need to show real-time asset prices on a website. -Developers building such applications can consult the following guide: - -- [Off-chain Apps](use-real-time-data/off-chain.md) - -Off-chain application developers should also consider using [Benchmarks](../benchmarks). -In addition to real-time data, Benchmarks provides access to historical Pyth prices. -These historical prices are useful for building price charts or graphs. diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/_meta.json b/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/_meta.json deleted file mode 100644 index 9a646f5016..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/_meta.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "evm": "in EVM Contracts", - "solana": "in Solana and SVM Programs", - "starknet": "in Starknet Contracts", - "fuel": "in Fuel Contracts", - "aptos": "in Aptos Contracts", - "sui": "in Sui Contracts", - "iota": "in IOTA Contracts", - "ton": "in TON Contracts", - "cosmwasm": "in CosmWasm Contracts", - "near": "in Near Contracts", - "off-chain": "in Off-Chain Applications" -} diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/off-chain.mdx b/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/off-chain.mdx deleted file mode 100644 index cba7d33b07..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/off-chain.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Real-Time Price Updates in Off-Chain Apps with Hermes-Client -description: >- - Harness hermes-client to retrieve real-time prices and subscribe to live - updates in your off-chain applications. (Note: price-service-sdk is - deprecated.) -full: false -index: false ---- - -# How to Use Real-Time Data in Off-Chain Applications - -This guide explains how to fetch the latest prices and subscribe to real-time price updates in off-chain applications. - - -
[`price-service-sdk`](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/client/js) was is deprecated and replaced by the [`hermes-client`](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js). - It can be used for fetching prices for off-chain applications as well as fetching price updates.
- -
Please refer to the [fetch-price-updates](../fetch-price-updates) guide for the details.
-
diff --git a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/sui.mdx b/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/sui.mdx deleted file mode 100644 index 90963450f2..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v1/use-real-time-data/sui.mdx +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: Using Real-Time Pyth Data in Sui Contracts -description: >- - Pyth provides SDKs, sample contracts, and tutorials for integrating real-time - price feeds into Sui applications. You can fetch current price data and update - on-chain feeds using these tools. -full: false -index: false ---- - -# How to Use Real-Time Data in Sui Contracts - -This guide explains how to use real-time Pyth data in Sui applications. - -## Install Pyth SDK - -Use the following dependency in your `Move.toml` file to use the latest Pyth Sui package and its dependencies: - - - -```sh copy -[dependencies.Pyth] -git = "https://github.com/pyth-network/pyth-crosschain.git" -subdir = "target_chains/sui/contracts" -rev = "sui-contract-mainnet" - -[dependencies.Wormhole] -git = "https://github.com/wormhole-foundation/wormhole.git" -subdir = "sui/wormhole" -rev = "sui/mainnet" - -# Pyth is locked into this specific `rev` because the package depends on Wormhole and is pinned to this version. - -[dependencies.Sui] -git = "https://github.com/MystenLabs/sui.git" -subdir = "crates/sui-framework/packages/sui-framework" -rev = "041c5f2bae2fe52079e44b70514333532d69f4e6" - -```` - - -```sh copy -[dependencies.Pyth] -git = "https://github.com/pyth-network/pyth-crosschain.git" -subdir = "target_chains/sui/contracts" -rev = "sui-contract-testnet" - -[dependencies.Wormhole] -git = "https://github.com/wormhole-foundation/wormhole.git" -subdir = "sui/wormhole" -rev = "sui/testnet" - -# Pyth is locked into this specific `rev` because the package depends on Wormhole and is pinned to this version. -[dependencies.Sui] -git = "https://github.com/MystenLabs/sui.git" -subdir = "crates/sui-framework/packages/sui-framework" -rev = "041c5f2bae2fe52079e44b70514333532d69f4e6" -```` - - - - -Pyth also provides a javascript SDK to construct transaction blocks that update price feeds: - - - - ```sh - # NPM - npm install --save @pythnetwork/pyth-sui-js - - # Yarn - yarn add @pythnetwork/pyth-sui-js - ``` - - - - -## Write Contract Code - -The code snippet below provides a general template for what your contract code should look like: - -```rust {18} copy -module pyth_example::main { - use sui::clock::Clock; - use pyth::price_info; - use pyth::price_identifier; - use pyth::price; - use pyth::pyth; - use pyth::price_info::PriceInfoObject; - - const E_INVALID_ID: u64 = 1; - - public fun use_pyth_price( - // Other arguments - clock: &Clock, - price_info_object: &PriceInfoObject, - ){ - let max_age = 60; - // Make sure the price is not older than max_age seconds - let price_struct = pyth::get_price_no_older_than(price_info_object,clock, max_age); - - // Check the price feed ID - let price_info = price_info::get_price_info_from_price_info_object(price_info_object); - let price_id = price_identifier::get_bytes(&price_info::get_price_identifier(&price_info)); - - // ETH/USD price feed ID - // The complete list of feed IDs is available at https://pyth.network/developers/price-feed-ids - // Note: Sui uses the Pyth price feed ID without the `0x` prefix. - assert!(price_id!=x"ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", E_INVALID_ID); - - // Extract the price, decimal, and timestamp from the price struct and use them - let decimal_i64 = price::get_expo(&price_struct); - let price_i64 = price::get_price(&price_struct); - let timestamp_sec = price::get_timestamp(&price_struct); - } -} -``` - -One can consume the price by calling `pyth::get_price` abovementioned or other utility functions on the `PriceInfoObject` in the Move module - -The code snippet below provides an example of how to update the Pyth price feeds: - -```ts copy -import { SuiPriceServiceConnection, SuiPythClient } from "@pythnetwork/pyth-sui-js"; -import { TransactionBlock } from "@mysten/sui.js"; - -// Get the Stable Hermes service URL from https://docs.pyth.network/price-feeds/api-instances-and-providers/hermes -const connection = new SuiPriceServiceConnection("https://hermes-beta.pyth.network"); - -const priceIDs = [ - // You can find the IDs of prices at https://pyth.network/developers/price-feed-ids - "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", // BTC/USD price ID - "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", // ETH/USD price ID -]; - -const priceUpdateData = await connection.getPriceFeedsUpdateData(priceIDs); - -// It is either injected from the browser or instantiated in the backend via some private key -const wallet: SignerWithProvider = getWallet(); -// Get the state IDs of the Pyth and Wormhole contracts from -// https://docs.pyth.network/price-feeds/contract-addresses/sui -const wormholeStateId = "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a"; -const pythStateId = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8"; - -const client = new SuiPythClient(wallet.provider, pythStateId, wormholeStateId); -const tx = new TransactionBlock(); -const priceInfoObjectIds = await client.updatePriceFeeds(tx, priceFeedUpdateData, priceIDs); - -tx.moveCall({ - target: `pyth_example::main::use_pyth_price`, - arguments: [ - ..., // other arguments needed for your contract - tx.object(priceInfoObjectIds[0]), - ], -}); - -const txBlock = { - transactionBlock: tx, - options: { - showEffects: true, - showEvents: true, - }, -}; - -const result = await wallet.signAndExecuteTransactionBlock(txBlock); -``` - -By calling the `updatePriceFeeds` function, the `SuiPythClient` adds the necessary transactions to the transaction block to update the price feeds. - - -
Your Sui Move module **should NOT** have a hard-coded call to `pyth::update_single_price_feed.` In other words, a contract should **never call** the Sui Pyth `pyth::update_single_price_feed` entry point. Instead, it should be called directly from client code (e.g., Typescript or Rust).
- -
When Sui contracts are [upgraded](<(https://docs.sui.io/build/package-upgrades)>), the address changes, which makes the old address no longer valid. If your module has a hard-coded call to `pyth::update_single_price_feed` living at a fixed call-site, it may eventually get bricked due to how Pyth upgrades are implemented. (Pyth only allow users to interact with the most recent package version for security reasons).
- -
- Therefore, you should build a [Sui programmable - transaction](https://docs.sui.io/build/prog-trans-ts-sdk) that first updates - the price by calling `pyth::update_single_price_feed` at the latest call-site - from the client-side and then call a function in your contract that invokes - `pyth::get_price` on the `PriceInfoObject` to get the recently updated price. - You can use `SuiPythClient` to build such transactions and handle all the - complexity of updating the price feeds. -
- -
Consult [Fetch Price Updates](../fetch-price-updates) for more information on how to fetch the `pyth_price_update`.
-
- -## Additional Resources - -You may find these additional resources helpful for developing your Sui application. - -### CLI Example - -[This example](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/sui/cli) shows how to update prices on a Sui network. It does the following: - -1. Fetches update data from Hermes for the given price feeds. -1. Call the Pyth Sui contract with a price update. - -You can run this example with `npm run example-relay`. A full command that updates prices on the Sui testnet looks like this: - -```bash -export SUI_KEY=YOUR_PRIV_KEY; -npm run example-relay -- --feed-id "5a035d5440f5c163069af66062bac6c79377bf88396fa27e6067bfca8096d280" \ ---hermes "https://hermes-beta.pyth.network" \ ---full-node "https://fullnode.testnet.sui.io:443" \ ---pyth-state-id "0xd3e79c2c083b934e78b3bd58a490ec6b092561954da6e7322e1e2b3c8abfddc0" \ ---wormhole-state-id "0x31358d198147da50db32eda2562951d53973a0c0ad5ed738e9b17d88b213d790" -``` - -### Contract Addresses - -Consult [Sui Contract Addresses](../contract-addresses/sui) to find the package IDs. - -### Pyth Price Feed IDs - -Consult [Pyth Price Feed IDs](https://pyth.network/developers/price-feed-ids) to find Pyth price feed IDs for various assets. diff --git a/apps/developer-hub/content/docs/price-feeds/v2/acquire-an-access-token.mdx b/apps/developer-hub/content/docs/price-feeds/v2/acquire-an-access-token.mdx deleted file mode 100644 index 9370d279f9..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/acquire-an-access-token.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "Acquire an Access Token" -description: "This guide explains how to acquire an access token for Pyth Lazer, which is required to authenticate websocket connections and subscribe to price updates." -full: false -index: false ---- - -This guide explains how to acquire an access token for Pyth Lazer, 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 - to keep your token secure and do not share it publicly. - - -## Using the Access Token - -Once you receive your access token, use it to authenticate the websocket connection by passing it as an `Authorization` header with the value `Bearer {token}`. - -### Example Usage - -```js copy -import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; - -const client = await PythLazerClient.create( - ["wss://pyth-lazer.dourolabs.app/v1/stream"], - "YOUR_ACCESS_TOKEN", -); -``` - -## 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. diff --git a/apps/developer-hub/content/docs/price-feeds/v2/getting-started.mdx b/apps/developer-hub/content/docs/price-feeds/v2/getting-started.mdx deleted file mode 100644 index c5b3adda18..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/getting-started.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Getting Started with Pyth Lazer" -description: "Please refer to the how-to guides to get started." -full: false -index: false ---- diff --git a/apps/developer-hub/content/docs/price-feeds/v2/index.mdx b/apps/developer-hub/content/docs/price-feeds/v2/index.mdx deleted file mode 100644 index e27c477362..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/index.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Pyth Lazer" -description: >- - Pyth Lazer is a low latency, highly customizable price oracle. -full: false -index: true ---- - -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/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/meta.json b/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/meta.json deleted file mode 100644 index 7407cf49fd..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "title": "Integrate as a Consumer", - "description": "Real-time data from financial institutions", - "icon": "ChartLine", - "pages": ["on-solana-and-fogo", "on-evm-chains"] -} diff --git a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/on-evm-chains.mdx b/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/on-evm-chains.mdx deleted file mode 100644 index fc1253adc9..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/on-evm-chains.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "On EVM chains" -description: "This guide explains how to integrate Pyth Lazer into your EVM smart contracts." -full: false -index: false ---- - -This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **EVM chains**. - -Integrating with Pyth Lazer 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. -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. - -```bash copy -forge install pyth-network/pyth-crosschain -``` - -Add the following to `requirements.txt{:js}` file: - -```bash copy -pyth-lazer-sdk/=lib/pyth-network/pyth-crosschain/lazer/contracts/evm -``` - -Once the SDK is installed, one can import the sdk into smart contracts: - -```solidity copy -import { PythLazer } from "pyth-lazer-sdk/PythLazer.sol"; -import { PythLazerLib } from "pyth-lazer-sdk/PythLazerLib.sol"; - -``` - -After importing the SDK, initialize the [`PythLazer`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/contracts/evm/src/PythLazer.sol#L7) contract and set up state varables to store prices and timestamps: - -```solidity copy -contract ExampleConsumer { - // Example state. - PythLazer pythLazer; - uint64 public price; - uint64 public timestamp; - - //... - - constructor(address pythLazerAddress) { - pythLazer = PythLazer(pythLazerAddress); - } -} - -``` - -Add an argument of type `bytes calldata{:solidity}` to the method which will receive the Pyth Lazer price udpate: - -```solidity copy -function updatePrice(bytes calldata priceUpdate) public payable { - uint256 verification_fee = pythLazer.verification_fee(); - (bytes calldata payload, ) = verifyUpdate{ value: verification_fee }(update); - //... -} - -``` - -The `verifyUpdate` function will verify the price update and return the payload and the verification fee. This call takes a fee which can be queried from [`verification_fee(){:solidity}`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/contracts/evm/src/PythLazer.sol#L9) function and passed to the `verifyUpdate` call. This fee is used to cover the cost of verifying the price update. - -This SDK provides [`parsePayloadHeader`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/contracts/evm/src/PythLazerLib.sol#L21) method to retrieve the values from the payload header. - -```solidity copy -(uint64 _timestamp, Channel channel, uint8 feedsLen, uint16 pos) = parsePayloadHeader(payload); -``` - -This method returns: - -- `_timestamp`: The timestamp of the price update. -- `channel`: The channel of the price update. -- `feedsLen`: The number of feeds in the price update. -- `pos`: The cursor position of the payload. - -One can iterate over all the feeds and properties present within the price update, modifying the state variables as necessary. - -Here is an example of how to iterate over the feeds and properties: - -```solidity copy -for (uint8 i = 0; i < feedsLen; i++) { - uint32 feedId; - uint8 num_properties; - (feedId, num_properties, pos) = parseFeedHeader(payload, pos); - for (uint8 j = 0; j < num_properties; j++) { - PriceFeedProperty property; - (property, pos) = parseFeedProperty(payload, pos); - if (property == PriceFeedProperty.Price) { - uint64 _price; - (_price, pos) = parseFeedValueUint64(payload, pos); - if (feedId == 2 && _timestamp > timestamp) { - price = _price; - timestamp = _timestamp; - } - } else if (property == PriceFeedProperty.BestBidPrice) { - uint64 _price; - (_price, pos) = parseFeedValueUint64(payload, pos); - } else if (property == PriceFeedProperty.BestAskPrice) { - uint64 _price; - (_price, pos) = parseFeedValueUint64(payload, pos); - } else { - revert("unknown property"); - } - } -} -``` - - - Make sure to pass the `pos` variable to every parsing call and assign the - returned `pos` value to the same variable. Failure to do so will cause - incorrect parsing results. - - - - When calling these parse functions, you must not skip price feeds or - properties. Every parsing function will modify your `pos` variable, so - skipping a call of `parseFeedHeader`, `parseFeedProperty`, or - `parseFeedValueUint64` will lead to incorrect parsing results. Keep in mind - that you can customize the set of price feeds and properties when requesting - price updates via WebSocket. This will be explained in the next step. - - -### Subscribe to Pyth Lazer 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. - -Consult [How to subscribe to price updates from Pyth Lazer](../subscribe-price-updates.mdx) for a complete step-by-step guide. - -### Include the price updates into smart contract transactions - -Now that you have the price updates, and your smart contract is able to parse the price updates, you can include the price updates into the smart contract transactions by passing the price updates received from the previous step as an argument to the `updatePrice` method of your smart contract. - - - -## Additional Resources - -You may find these additional resources helpful for integrating Pyth Lazer 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. - -### 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-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Lazer websocket. diff --git a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/on-solana-and-fogo.mdx b/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/on-solana-and-fogo.mdx deleted file mode 100644 index 25ca7feb06..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-consumer/on-solana-and-fogo.mdx +++ /dev/null @@ -1,284 +0,0 @@ ---- -title: "On Solana and FOGO" -description: "This guide explains how to integrate Pyth Lazer into your Solana and FOGO smart contracts." -full: false -index: false ---- - -This guide is intended to serve users who wants to consume prices from the Pyth Lazer on **Solana and Fogo**. - -Integrating with Pyth Lazer 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. -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/), -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)): - -```toml copy -[dependencies] -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. - -In order to successfully validate the Pyth Lazer message, the instruction needs to receive the following accounts: - -- Fee payer account -- Pyth Lazer program ([`pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt`](https://solscan.io/account/pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt)) -- Pyth Lazer storage account (`3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL`) -- Pyth Lazer treasury account (`Gx4MBPb1vqZLJajZmsKLg8fGw9ErhoKsR8LeKcCKFyak`) -- The standard Solana system program account -- The standard Solana instructions sysvar account - -You may also add any other accounts your contract needs. - - - The code snippets below are part of the full consumer contract example - [available on - Github](https://github.com/pyth-network/pyth-examples/tree/main/lazer/solana). - - -The following code can be used to set up a new instruction within a SVM contract: - -```rust copy -use num_derive::FromPrimitive; -use num_traits::FromPrimitive; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, FromPrimitive)] -pub enum Instruction { - //... - /// Update price. - /// Data: `UpdateArgs` followed by a signed Pyth Lazer update. - /// Accounts: - /// 1. payer account - /// 2. example data account [writable] - /// 3. pyth program account [readonly] - /// 4. pyth storage account [readonly] - /// 5. pyth treasury account [writable] - /// 6. system program [readonly] - /// 7. instructions sysvar sysvar account [readonly] - Update = 1, -} - -/// Inputs to the `Update` instruction. `UpdateArgs` must be followed by a signed Pyth Lazer message. -#[derive(Debug, Clone, Copy, Zeroable, Pod)] -#[repr(C, packed)] -pub struct UpdateArgs { - /// Example argument - pub hello: u64, -} - -/// Program entrypoint's implementation. -pub fn process_instruction( - program_id: &Pubkey, - accounts: &[AccountInfo], - instruction_data: &[u8], -) -> ProgramResult { - // In our example contract, the first byte is the ID of the instruction. - let instruction = *instruction_data - .first() - .ok_or(ProgramError::InvalidInstructionData)?; - let instruction = - Instruction::from_u8(instruction).ok_or(ProgramError::InvalidInstructionData)?; - let instruction_args = &instruction_data[1..]; - - match instruction { - Instruction::Initialize => { - process_initialize_instruction(program_id, accounts, instruction_args) - } - Instruction::Update => process_update_instruction(program_id, accounts, instruction_args), - } -} - -pub fn process_update_instruction( - program_id: &Pubkey, - accounts: &[AccountInfo], - instruction_args: &[u8], -) -> ProgramResult { - // Verify accounts passed to the instruction. - if accounts.len() != 7 { - return Err(ProgramError::NotEnoughAccountKeys); - } - let payer_account = &accounts[0]; - let data_account = &accounts[1]; - let _pyth_program_account = &accounts[2]; - let pyth_storage_account = &accounts[3]; - let pyth_treasury_account = &accounts[4]; - let system_program_account = &accounts[5]; - let instructions_sysvar_account = &accounts[6]; - // See below for next steps... -} -``` - -Invoke the Pyth Lazer on-chain program with appropriate arguments to validate the Pyth Lazer signature of the message. - -```rust copy -// We expect the instruction to the built-in ed25519 program to be -// the first instruction within the transaction. -let ed25519_instruction_index = 0; -// We expect our signature to be the first (and only) signature to be checked -// by the built-in ed25519 program within the transaction. -let signature_index = 0; -// Verify Lazer signature. -invoke( - &ProgramInstruction::new_with_bytes( - pyth_lazer_solana_contract::ID, - &VerifyMessage { - message_data: pyth_message.to_vec(), - ed25519_instruction_index, - signature_index, - } - .data(), - vec![ - AccountMeta::new(*payer_account.key, true), - AccountMeta::new_readonly(*pyth_storage_account.key, false), - AccountMeta::new(*pyth_treasury_account.key, false), - AccountMeta::new_readonly(*system_program_account.key, false), - AccountMeta::new_readonly(*instructions_sysvar_account.key, false), - ], - ), - &[ - payer_account.clone(), - pyth_storage_account.clone(), - pyth_treasury_account.clone(), - system_program_account.clone(), - instructions_sysvar_account.clone(), - ], -)?; -``` - - - Note: When using native ed25519 signatures on SVM, we must use the built-in - ed25519 program provided by the SVM runtime. This program can't be invoked - from another contract. Instead, it must be called in an explicit instruction - within the submitted transaction. This means that the sender of the - transaction must include that instruction in the transaction. Our SDK - leverages SVM runtime capabilities to ensure the ed25519 program has been - correctly called in the transaction. - - -Now parse the Pyth Lazer message. - -```rust copy -// Deserialize and use the payload. -let data = PayloadData::deserialize_slice_le(verified.payload) - .map_err(|_| ProgramError::InvalidInstructionData)?; - -if data.feeds.is_empty() || data.feeds[0].properties.is_empty() { - return Err(ProgramError::InvalidInstructionData); -} -``` - -Now you can update the state according to the contract's logic: - -```rust copy -// Read the data PDA of our example contract. -let mut state_data = data_account.data.borrow_mut(); -let state = - try_from_bytes_mut::(*state_data).map_err(|_| ProgramError::InvalidAccountData)?; - -if state.price_feed != data.feeds[0].feed_id.0 { - return Err(ProgramError::InvalidInstructionData); -} -if data.channel_id != Channel::RealTime.id() { - return Err(ProgramError::InvalidInstructionData); -} -if data.timestamp_us.0 <= state.latest_timestamp { - return Err(ProgramError::AccountAlreadyInitialized); -} -let PayloadPropertyValue::Price(Some(price)) = data.feeds[0].properties[0] else { - return Err(ProgramError::InvalidInstructionData); -}; -state.latest_price = price.into_inner().into(); -state.latest_timestamp = data.timestamp_us.0; -``` - - - Pyth 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 - -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. - -Consult [How to subscribe to price updates from Pyth Lazer](../subscribe-price-updates.mdx) for a complete step-by-step guide. - -### Include the price updates into smart contract transactions - -Now that you have the price updates, and your smart contract is able to parse the price updates, you can include the price updates into the smart contract transactions by passing the price updates received from the previous step as an argument to the `update_price` method of your smart contract. - -In order to execute signature verification, you need to include an instruction for the built-in Solana ed25519 program in your transaction. - - - - In Rust, you can leverage helpers provided in the `pyth_lazer_solana_contract` crate: - -```rust copy -// Instruction #0 will be ed25519 instruction; -// Instruction #1 will be our contract instruction. -let instruction_index = 1; -// Total offset of Pyth Lazer update within the instruction data; -// 1 byte is the instruction type. -let message_offset = (size_of::() + 1).try_into().unwrap(); -let ed25519_args = pyth_lazer_solana_contract::Ed25519SignatureOffsets::new( - &message, - instruction_index, - message_offset, -); -let mut tx = Transaction::new_with_payer( - &[ - Instruction::new_with_bytes( - solana_program::ed25519_program::ID, - &pyth_lazer_solana_contract::ed25519_program_args(&[ed25519_args]), - vec![], - ), - Instruction::new_with_bytes( - pyth_lazer_solana_example::ID, - &update_data, - vec![ - AccountMeta::new(payer.pubkey(), true), - AccountMeta::new(data_pda_key, false), - AccountMeta::new(pyth_lazer_solana_contract::ID, false), - AccountMeta::new_readonly(pyth_lazer_solana_contract::STORAGE_ID, false), - AccountMeta::new(treasury, false), - AccountMeta::new_readonly(system_program::ID, false), - AccountMeta::new_readonly(sysvar::instructions::ID, false), - ], - ), - ], - Some(&payer.pubkey()), -); -``` - - - - In TypeScript and JavaScript, you can leverage helpers provided in the `@pythnetwork/pyth-lazer-sdk` NPM package. - {/* TODO: add example code */} - - - - -## Additional Resources - -You may find these additional resources helpful for integrating Pyth Lazer into 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. - -### 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-js](https://github.com/pyth-network/pyth-examples/tree/main/lazer/js) is a simple example for subscribing to the Pyth Lazer websocket. diff --git a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-publisher.mdx b/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-publisher.mdx deleted file mode 100644 index a8fe80a29a..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/integrate-as-a-publisher.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "How to Integrate Pyth Lazer as a Publisher" -description: "This guide explains how to integrate Pyth Lazer as a publisher." -full: false -index: false ---- - -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/apps/developer-hub/content/docs/price-feeds/v2/meta.json b/apps/developer-hub/content/docs/price-feeds/v2/meta.json deleted file mode 100644 index 904e0f9bea..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/meta.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "root": true, - "title": "Price Feeds V2", - "description": "Real-time data from financial institutions", - "icon": "ChartLine", - "pages": [ - "index", - "getting-started", - "---How-To Guides---", - "acquire-an-access-token", - "subscribe-to-prices", - "...integrate-as-a-consumer", - "integrate-as-a-publisher", - "---Reference Material---", - "price-feed-ids", - "api-reference", - "examples" - ] -} diff --git a/apps/developer-hub/content/docs/price-feeds/v2/subscribe-to-prices.mdx b/apps/developer-hub/content/docs/price-feeds/v2/subscribe-to-prices.mdx deleted file mode 100644 index cdd080dcd6..0000000000 --- a/apps/developer-hub/content/docs/price-feeds/v2/subscribe-to-prices.mdx +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: "Subscribe to Price Updates" -description: "This guide explains how to subscribe to price updates from Pyth Lazer." -full: false -index: false ---- - -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. - -Subscribing to price updates 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). - -The websocket server is available at `wss://pyth-lazer.dourolabs.app/v1/stream{:bash}`. - - - -### 1. Acquire an access token - -Please fill out [this form](https://tally.so/r/nP2lG5) to contact the Pyth team and get the access token. - -Use the access token to authenticate the websocket connection by passing it as an `Authorization{:bash}` header with the value `Bearer {token}{:bash}`. - -### 2. Configure subscription parameters - -Lazer supports several request/subscription parameters to customize the received price updates. -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: - -```js copy -client.send({ - type: "subscribe", - subscriptionId: 1, - priceFeedIds: [1, 2], - properties: ["price"], - chains: ["solana"], - channel: "fixed_rate@200ms", -}); -``` - -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. -- `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. - -There are also a few other configuration parameters -- see the [API documentation](https://pyth-lazer.dourolabs.app/docs) for more details. - -Determine the most suitable values for your application -- they will be used in the next step. - -### 3. Subscribe to the price updates - -To subscribe to the price updates, send a request to the websocket server. The server will respond with a signed price update. - -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: - -```bash copy -npm install --save @pythnetwork/pyth-lazer-sdk -``` - -2. Then create a [`PythLazerClient`](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/js/src/client.ts#L32) object using the URL and the access token requested from the Pyth team in the first step: - -```js copy -import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; - -const client = await PythLazerClient.create( - ["wss://pyth-lazer.dourolabs.app/v1/stream"], - "YOUR_ACCESS_TOKEN", -); -``` - -3. After the client is created, subscribe to updates (using the configuration parameters from step 2): - -```js copy -client.subscribe({ - type: "subscribe", - subscriptionId: 1, - priceFeedIds: [1, 2], - properties: ["price"], - chains: ["solana"], - channel: "fixed_rate@200ms", -}); -``` - -4. Once the connection is established, the server will start sending the price updates to the client: - -```js copy -client.addMessageListener((message) => { - console.log(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: - -```json copy -{ - "type": "streamUpdated", - "subscriptionId": 1, - "parsed": { - "timestampUs": "1730986152400000", - "priceFeeds": [ - { - "priceFeedId": 1, - "price": "1006900000000" - }, - { - "priceFeedId": 2, - "price": "2006900000000" - } - ] - }, - "solana": { - "encoding": "hex", - "data": "b9011a82d239c094c52016990d6ca2b261dbb1157ad503cbd3ea0679493316150cf3457624d19ec3f6e0a0e94373ab0971e39d939beda15cc02eb3c5454eb700f1f7310df65210bee4fcf5b1cee1e537fabcfd95010297653b94af04d454fc473e94834f2a0075d3c7938094b99e52260600030201000000010000b5ea6fea00000002000000010000c58f44d3010000" - } -} -``` - - - -## Additional Resources - -You may find these additional resources helpful for subscribing to price updates from Pyth Lazer. - -### 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. - -### 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. diff --git a/apps/developer-hub/src/app/(docs)/[section]/layout.tsx b/apps/developer-hub/src/app/(docs)/[section]/layout.tsx index 8a258e1fe6..7738bd74d5 100644 --- a/apps/developer-hub/src/app/(docs)/[section]/layout.tsx +++ b/apps/developer-hub/src/app/(docs)/[section]/layout.tsx @@ -1,9 +1,42 @@ +import { Banner } from "fumadocs-ui/components/banner"; import { DocsLayout } from "fumadocs-ui/layouts/docs"; +import Link from "next/link"; import type { ReactNode } from "react"; import { docsOptions } from "../../../config/layout.config"; -export default function Layout({ children }: { children: ReactNode }) { - const options = { ...docsOptions }; - return {children}; +export default async function Layout({ + children, + params, +}: { + children: ReactNode; + params: Promise<{ section: string }>; +}) { + const { section } = await params; + + return ( + <> + {section === "entropy" && ( + + + + Try the{" "} + + Entropy Explorer + + {" "} + to track and debug callback issues.  |  + + Learn what's new in Entropy v2. + + + + )} + {children} + + ); } diff --git a/apps/developer-hub/src/components/IntegrationCard/index.tsx b/apps/developer-hub/src/components/IntegrationCard/index.tsx index da31b4e9a4..95e7a0feab 100644 --- a/apps/developer-hub/src/components/IntegrationCard/index.tsx +++ b/apps/developer-hub/src/components/IntegrationCard/index.tsx @@ -3,6 +3,11 @@ import Link from "next/link"; import styles from "./index.module.scss"; +type Feature = { + icon: React.ReactNode; + text: string; +}; + type IntegrationCardProps = { href: string; icon: React.ReactNode; @@ -11,6 +16,7 @@ type IntegrationCardProps = { colorScheme?: "blue" | "green" | "purple" | "yellow"; external?: boolean; showArrow?: boolean; + features?: Feature[]; }; export function IntegrationCard({ @@ -21,6 +27,7 @@ export function IntegrationCard({ colorScheme = "blue", external, showArrow = true, + features, }: IntegrationCardProps) { const commonProps = { href, @@ -42,6 +49,20 @@ export function IntegrationCard({ )}

{description}

+ {features && features.length > 0 && ( +
+ {features.map((feature, index) => ( +
+
+ {feature.icon} +
+ + {feature.text} + +
+ ))} +
+ )} ); diff --git a/apps/developer-hub/src/mdx-components.tsx b/apps/developer-hub/src/mdx-components.tsx index 0d1308841a..20240cb85e 100644 --- a/apps/developer-hub/src/mdx-components.tsx +++ b/apps/developer-hub/src/mdx-components.tsx @@ -17,7 +17,5 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents { Tab, ...components, InfoBox: InfoBox, - // Fuma has a Callout component in `defaultMdxComponents` which we still want to overwrite - Callout: InfoBox, }; }