GMXEquity
Documentation for eth_defi.gmx.valuation.GMXEquity Python class.
- class GMXEquity
Bases:
objectEquity breakdown for a GMX trading account.
Attributes summary
Sum of all reserves in USD --
stable_reserves + non_stable_reserves.Sum of open GMX position values in USD, net of borrowing fees, funding fees, position fees and price impact.
Portion of
reservessummed at face value because the token looks like a USD-pegged stablecoin.Portion of
reservesconverted to USD via the GMX oracle mark price -- non-stablecoin reserve tokens, plus native ETH wheninclude_native_ethwas set.Methods summary
- reserves: decimal.Decimal
Sum of all reserves in USD –
stable_reserves + non_stable_reserves.
- positions: decimal.Decimal
Sum of open GMX position values in USD, net of borrowing fees, funding fees, position fees and price impact.
- stable_reserves: decimal.Decimal
Portion of
reservessummed at face value because the token looks like a USD-pegged stablecoin. Defaults toDecimal(0)for backward-compatible direct construction (fetch_gmx_total_equity()always sets this explicitly and correctly).
- non_stable_reserves: decimal.Decimal
Portion of
reservesconverted to USD via the GMX oracle mark price – non-stablecoin reserve tokens, plus native ETH wheninclude_native_ethwas set. Defaults toDecimal(0)for backward-compatible direct construction.
- get_total()
Total equity = reserves + positions.
- Return type
- __init__(reserves, positions, stable_reserves=Decimal('0'), non_stable_reserves=Decimal('0'))
- Parameters
reserves (decimal.Decimal) –
positions (decimal.Decimal) –
stable_reserves (decimal.Decimal) –
non_stable_reserves (decimal.Decimal) –
- Return type
None