broadcast_and_resolve(web3, state, trades, stop_on_execution_failure=False)[source]#

Do the live trade execution.

  • Push trades to a live blockchain

  • Wait transactions to be mined

  • Based on the transaction result, update the state of the trade if it was success or not

  • stop_on_execution_failure – If any of the transactions fail, then raise an exception. Set for unit test.

  • web3 (Web3) –

  • state (State) –

  • trades (List[TradeExecution]) –