Skip to content

API ReferencePricing and oraclesFunction

getPriceFeedId()

function getPriceFeedId(ctx, params): Promise<string>;

Gets the Price Feed ID for the specified token. Tries the on-chain PythPriceOracle first; falls back to the Pyth Hermes API if not found.

Parameters

ParameterTypeDescription
ctxSDKContextThe SDK context.
paramsGetPriceFeedIdParamsThe token address to look up.

Returns

Promise<string>

The price feed ID.