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)

Currently hardcoded for Uniswap v2 exchanges only.

See test_uniswap_live_stop_loss.py for an example.

Returns

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

Parameters
Return type

ExecutionLoop