PoolDetails

Documentation for eth_defi.uniswap_v3.pool.PoolDetails Python class.

class PoolDetails[source]

Uniswap v3 trading pool info.

See fetch_pool_details() on how to construct.

Attributes summary

address

Pool address

token0

One pair of tokens

token1

One pair of tokens

raw_fee

Pool fee as expressed in smart contracts (100*bps) e.g.

fee

Pool fee as % multiplier, 1 = 100%

pool

Pool contract proxy

Methods summary

__init__(address, token0, token1, raw_fee, ...)

convert_price_to_human(tick[, ...])

Convert the price obtained through

address: eth_typing.evm.HexAddress

Pool address

token0: eth_defi.token.TokenDetails

One pair of tokens

token1: eth_defi.token.TokenDetails

One pair of tokens

raw_fee: int

Pool fee as expressed in smart contracts (100*bps) e.g. 0.3% = 30bps so raw_fee = 3000

fee: float

Pool fee as % multiplier, 1 = 100%

pool: web3.contract.contract.Contract

Pool contract proxy

convert_price_to_human(tick, reverse_token_order=False)[source]

Convert the price obtained through

Parameters
  • tick (int) – Logarithmic tick from the Uniswap pool

  • reverse_token_order – For natural base - quote token order. If set, assume quote token is token0.

Return type

decimal.Decimal

__init__(address, token0, token1, raw_fee, fee, pool)
Parameters
Return type

None