Skip to content

Feat(pricefeed/price feed id) add data #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pages/price-feeds/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
},

"api-reference": "API Reference",
"price-feed-ids": "Price Feed IDs",
"price-feeds": "Price Feeds",
"sponsored-feeds": "Sponsored Feeds",
"asset-classes": "Asset Classes",
"market-hours": "Market Hours",
"best-practices": "Best Practices",
"error-codes": "Error Codes",
Expand Down
16 changes: 0 additions & 16 deletions pages/price-feeds/price-feed-ids.mdx

This file was deleted.

31 changes: 31 additions & 0 deletions pages/price-feeds/price-feeds.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Price Feeds

Pyth Price Feeds provide real-time, first-party, market data for a wide range of assets.

Every price feed has a **unique ID**, representing the specific pair of assets being priced.
These specific pairs are part of an asset class, which is a broader category of assets.

Anyone can fetch available price feeds and their IDs via [Hermes API](https://hermes.pyth.network/docs/#/rest/price_feeds_metadata).

## Asset Classes

Every price feed belongs to an asset class. These asset classes distinguish between different types of assets, such as crypto, US equities, and metals.

Refer to the [Asset Classes](./price-feeds/asset-classes.md) page to learn more about the existing asset classes.

## Price Feed IDs

Price Feed IDs are unique identifiers for each specific pair of assets being priced (e.g. BTC/USD).
Every price update is tagged with the corresponding price feed ID.

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.
3 changes: 3 additions & 0 deletions pages/price-feeds/price-feeds/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"asset-classes": "Asset Classes"
}
14 changes: 14 additions & 0 deletions pages/price-feeds/price-feeds/asset-classes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Asset Classes

[Pyth price feeds](https://www.pyth.network/price-feeds) provide market data for the following asset classes:

| Asset Class | Subclass | Definition |
| ----------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Crypto | Spot Prices | Real-time prices for cryptocurrencies and digital assets |
| | Redemption Rates | Real-time swap rates derived from smart contracts for the redemption of liquid staking and liquid restaking tokens (LSTs and LRTs), liquidity provider tokens (LP Tokens) and interest-bearing assets, including tokenised notes |
| | Indices | Real-time prices that measure the performance of baskets of cryptocurrencies and digital assets |
| US Equities | Spot Prices | Real-time prices for US equities |
| FX | Spot Prices | Real-time prices for fiat currency pairs |
| Metals | Spot Prices | Real-time prices for precious metals |
| Rates | Future Prices | Real-time prices for fixed income products, including bond futures |
| Commodities | Futures Prices | Real-time prices for commodity futures |
Loading