UniswapV2PoolRevaluator#
tradeexecutor.ethereum.uniswap_v2_valuation.UniswapV2PoolRevaluator class.
- class UniswapV2PoolRevaluator[source]#
Bases:
ValuationModel
Re-value assets based on their on-chain price.
Does directly JSON-RPC call to get the latest price in the Uniswap pools.
Only uses direct route - mostly useful for testing, may not give a realistic price in real world with multiple order routing options.
Warning
This valuation metohd always uses the latest price. It cannot be used for backtesting.
- __init__(pricing_model)[source]#
- Parameters
pricing_model (UniswapV2LivePricing) –
Methods
__init__
(pricing_model)- __init__(pricing_model)[source]#
- Parameters
pricing_model (UniswapV2LivePricing) –