Static
fetchFetches and calculates the prices for a set of tokens. This method will derive the pools that need to be queried from the mints and is not performant.
The mints to fetch prices for.
The configuration for the price calculation.
The threshold configuration for the price calculation.
an WhirlpoolAccountFetchOptions object to define fetch and cache options when accessing on-chain accounts
Data that is already available to avoid redundant fetches.
A map of token addresses to prices.
Static
fetchFetches and calculates the token prices from a set of pools.
The pools to fetch prices for.
The configuration for the price calculation.
The threshold configuration for the price calculation.
an WhirlpoolAccountFetchOptions object to define fetch and cache options when accessing on-chain accounts
A map of token addresses to prices
Static
calculateCalculate the price of each token in the mints array.
Each token will be priced against the first quote token in the config.quoteTokens array with sufficient liquidity. If a token does not have sufficient liquidity against the first quote token, then it will be priced against the next quote token in the array. If a token does not have sufficient liquidity against any quote token, then the price will be set to null.
The mints to calculate prices for.
The data required to calculate prices.
The configuration for the price calculation.
The threshold configuration for the price calculation.
A map of token addresses to prices.
PriceModule is a static class that provides functions for fetching and calculating token prices for a set of pools or mints.
Deprecated
PriceModule will be removed in the future release. Please use endpoint which provides prices.