fetch_quote_token_tvl_with_exchange_rate#
API documentation for tradeexecutor.ethereum.tvl.fetch_quote_token_tvl_with_exchange_rate Python function.
- fetch_quote_token_tvl_with_exchange_rate(web3, pair, exchange_rates={})[source]#
Fetch real-time TVL of any trading pool.
Get the locked in quote token amount in a bool
Quote token locked is a proxy for the real market depth, although the shape of the liquidity will vary
Uniswap v2 and v3 area looked depending on the pool type
The quote token (WETH) is translated to the US dollars.
Note
At the moment, Uniswap v2 and v3 pairs supported only.
- Parameters:
pair (TradingPairIdentifier) – Trading pair
exchange_rates – address -> conversion raet mapping for WETH, others.
web3 (Web3) –
- Return type: