PairDetails

Documentation for eth_defi.uniswap_v2.pair.PairDetails class.

class PairDetails[source]

Uniswap v2 trading pair info.

Attributes summary

address

Pool address

token0

One pair of tokens

token1

One pair of tokens

Methods summary

__init__(address, token0, token1)

convert_price_to_human(reserve0, reserve1[, ...])

Convert the price obtained through Sync event

address: HexAddress

Pool address

token0: eth_defi.token.TokenDetails

One pair of tokens

token1: eth_defi.token.TokenDetails

One pair of tokens

convert_price_to_human(reserve0, reserve1, reverse_token_order=False)[source]

Convert the price obtained through Sync event

Parameters
  • reverse_token_order – Decide token order for human (base, quote token) order. If set, assume quote token is token0.

  • reserve0 (int) –

  • reserve1 (int) –

__init__(address, token0, token1)
Parameters
Return type

None