set_up_simulated_execution_loop_uniswap_v2#

API documentation for tradeexecutor.testing.simulated_execution_loop.set_up_simulated_execution_loop_uniswap_v2 Python function.

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:
Returns:

Execution loop you can manually poke forward tick by tick, block by block.

Return type:

ExecutionLoop