Options
All
  • Public
  • Public/Protected
  • All
Menu

PriceModule is a static class that provides functions for fetching and calculating token prices for a set of pools or mints.

Hierarchy

  • PriceModule

Index

Other

PriceModule

  • Calculate 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.

    Parameters

    • mints: Address[]

      The mints to calculate prices for.

    • priceCalcData: PriceCalculationData

      The data required to calculate prices.

    • config: GetPricesConfig = defaultGetPricesConfig

      The configuration for the price calculation.

    • thresholdConfig: GetPricesThresholdConfig = defaultGetPricesThresholdConfig

      The threshold configuration for the price calculation.

    Returns PriceMap

    A map of token addresses to prices.

Generated using TypeDoc