set_up_simulated_execution_loop_uniswap_v2#
- set_up_simulated_execution_loop_uniswap_v2(*ignore, web3, decide_trades, universe, routing_model, state, wallet_account)[source]#
Set up a simulated execution loop.
Create a strategy execution that connects to in-memory blockchain simulation.
This allows us to step through trades block by block and have strategies to respodn to price action (e.g. stop loss)
See test_uniswap_live_stop_loss.py for an example.
- Parameters:
wallet_account (LocalAccount) – A trader account with some deployed money
web3 (Web3) –
decide_trades (DecideTradesProtocol) –
universe (StrategyExecutionUniverse) –
routing_model (UniswapV2SimpleRoutingModel) –
state (State) –
- Returns:
Execution loop you can manually poke forward tick by tick, block by block.
- Return type: