JavaScript SDK API Reference / Utilities / getPythFeedAccountKey
Function: getPythFeedAccountKey()
getPythFeedAccountKey(
shard,priceFeed): [PublicKey,number]
Defined in: utils/getPythFeedAccountKey.ts:17
Derives a Pyth push-oracle price-feed account address from its shard and feed ID.
Parameters
shard
number
Pyth feed shard identifier
priceFeed
number[]
Price-feed identifier bytes
Returns
[PublicKey, number]
Derived Pyth feed address and bump seed
Example
const [address] = getPythFeedAccountKey(0, priceFeedId);