get_current_price#
API documentation for tradeexecutor.ethereum.uniswap_v2.uniswap_v2_execution.get_current_price Python function.
- get_current_price(web3, uniswap, pair, quantity=Decimal('1'))[source]#
- Get a price from Uniswap v2 pool, assuming you are selling 1 unit of base token. - Does decimal adjustment. - Returns:
- Price in quote token. 
- Parameters:
- web3 (Web3) – 
- uniswap (UniswapV2Deployment) – 
- pair (TradingPairIdentifier) – 
 
- Return type: