Type alias GetPricesThresholdConfig

GetPricesThresholdConfig: {
    amountOut: BN;
    priceImpactThreshold: number;
}

A config object for the PriceModule functions to define thresholds for price calculations. Whirlpools that do not fit the criteria set by the parameters below will be excluded in the price calculation.

Type declaration

  • amountOut: BN
  • priceImpactThreshold: number

Param: amountOut

The token amount in terms of the first quote token amount to evaluate a Whirlpool's liquidity against.

Param: priceImpactThreshold

Using amountOut to perform a swap quote on a pool, this value is the maximum price impact that a Whirlpool can have to be included in the price calculation.

Generated using TypeDoc