Skip to content

API ReferencePricing and oraclesFunction

tokenUsdPricesQuery()

function tokenUsdPricesQuery(sdk, params): AnvilQueryDefinition<UsdPriceOutcome[]>;

Defines a best-effort batch token USD-price read.

Parameters

ParameterType
sdkAnvilSDK
paramsGetUsdPricesParams

Returns

AnvilQueryDefinition<UsdPriceOutcome[]>

Remarks

Cache identity includes the entry list in caller order, with duplicates, because the result is positionally aligned to params.tokens. Address entries key case-insensitively; feed entries key by normalized feed ID, decimals, and caller-supplied key — since key also determines that entry’s outcome identity, two feed entries that differ only by key are different requests for cache purposes. Pass a stably ordered list so reordering the same set does not create a second cache entry and a second Hermes request.