Skip to content
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
2 changes: 1 addition & 1 deletion pages/price-feeds/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"pythnet-reference": "Pythnet Reference",

"examples": {
"title": "Examples Application ↗",
"title": "Example Applications ↗",
"href": "https://github.com/pyth-network/pyth-examples/tree/main/price_feeds"
},
"-- Understand Pyth": {
Expand Down
2 changes: 1 addition & 1 deletion pages/price-feeds/use-real-time-data/evm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This guide explains how to use real-time Pyth data in EVM contracts. For an inte
## Install Pyth SDK

Pyth provides a [Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/solidity) to fetch prices from Pyth contracts.
The SDK exposes `IPyth` interface to interact with Pyth price feeds
The SDK exposes `IPyth` interface to interact with Pyth price feeds.

**Truffle/Hardhat**

Expand Down
10 changes: 5 additions & 5 deletions pages/price-feeds/use-real-time-data/off-chain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide explains how to use the [typescript SDK client](https://github.com/py

## Installation

The Pyth SDK can be installed using npm or yarn.
The Pyth SDK can be installed using npm or yarn:

### npm

Expand All @@ -21,7 +21,7 @@ yarn add @pythnetwork/price-service-client
## Usage

Typical usage of the Pyth SDK involves creating a `PriceServiceConnection` instance, by passing the URL of the [Hermes](https://hermes.pyth.network/docs/#/) service to the constructor.
You can then use the `getLatestPriceFeeds` method to fetch the latest prices of the specified price feeds.
You can then use the `getLatestPriceFeeds` method to fetch the latest prices of the specified price feeds:

```typescript copy
// Get the Stable Hermes service URL from https://docs.pyth.network/price-feeds/api-instances-and-providers/hermes
Expand All @@ -37,7 +37,7 @@ const currentPrices = await connection.getLatestPriceFeeds(priceIds);
console.log(currentPrices);
```

The `getLatestPriceFeeds` method returns an array of `PriceFeed` objects. Each `PriceFeed` object contains the latest price, the Exponential Moving Average (EMA) price, and other metadata.
The `getLatestPriceFeeds` method returns an array of `PriceFeed` objects. Each `PriceFeed` object contains the latest price, the Exponential Moving Average (EMA) price, and other metadata:

```bash
[
Expand Down Expand Up @@ -78,7 +78,7 @@ The `getLatestPriceFeeds` method returns an array of `PriceFeed` objects. Each `
]
```

You can also subscribe to real-time price updates over a WebSocket connection using the `subscribePriceFeedUpdates` method.
You can also subscribe to real-time price updates over a WebSocket connection using the `subscribePriceFeedUpdates` method:

```typescript copy
// priceIds here is the one declared in the above code snippet.
Expand Down Expand Up @@ -113,4 +113,4 @@ The [Hermes API](https://hermes.pyth.network/docs/#/) reference lets you interac

### Price Feed IDs

The [Price Feed Ids](https://pyth.network/developers/price-feed-ids) lists the price feeds available on the Pyth network.
The [Price Feed IDs](https://pyth.network/developers/price-feed-ids) lists the price feeds available on the Pyth network.