You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many applications additionally need to display Pyth prices off-chain, for example, in their frontend application.
118
-
The `SuiPriceServiceConnection` provides two different ways to fetch the current Pyth price.
118
+
The `SuiPriceServiceConnection` is an extension of the [Hermes client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js)
119
+
and provides two different ways to fetch the current Pyth price.
119
120
The code blocks below assume that the `connection` and `priceIds` objects have been initialized as shown above.
120
121
The first method is a single-shot query:
121
122
122
123
```typescript
123
-
// `getLatestPriceFeeds` returns a `PriceFeed` for each price id. It contains all information about a price and has
124
-
// utility functions to get the current and exponentially-weighted moving average price, and other functionality.
// `getLatestPriceFeeds` returns a `PriceUpdate`; see the [hermes-client](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/hermes/client/js) documentation for details.
0 commit comments