PriceImpactParams

Documentation for eth_defi.gmx.market_depth.PriceImpactParams Python class.

class PriceImpactParams

Bases: object

Per-market price impact parameters read from the GMX DataStore contract.

All factor and exponent values use GMX’s 30-decimal fixed-point format (integers). Pass them directly to estimate_position_price_impact().

Attributes summary

positive_factor

Impact factor for positive (balance-improving) trades (30-decimal int)

negative_factor

Impact factor for negative (balance-worsening) trades (30-decimal int)

positive_exponent

Exponent factor for positive impact (30-decimal int)

negative_exponent

Exponent factor for negative impact (30-decimal int)

max_positive_factor

Maximum position impact factor cap for positive impact (30-decimal int).

max_negative_factor

Maximum position impact factor cap for negative impact (30-decimal int).

Methods summary

__init__(positive_factor, negative_factor, ...)

positive_factor: int

Impact factor for positive (balance-improving) trades (30-decimal int)

negative_factor: int

Impact factor for negative (balance-worsening) trades (30-decimal int)

positive_exponent: int

Exponent factor for positive impact (30-decimal int)

negative_exponent: int

Exponent factor for negative impact (30-decimal int)

max_positive_factor: int

Maximum position impact factor cap for positive impact (30-decimal int). 0 means no explicit cap applies.

max_negative_factor: int

Maximum position impact factor cap for negative impact (30-decimal int). 0 means no explicit cap applies.

__init__(positive_factor, negative_factor, positive_exponent, negative_exponent, max_positive_factor, max_negative_factor)
Parameters
  • positive_factor (int) –

  • negative_factor (int) –

  • positive_exponent (int) –

  • negative_exponent (int) –

  • max_positive_factor (int) –

  • max_negative_factor (int) –

Return type

None