report_failure#

API documentation for tradeexecutor.ethereum.swap.report_failure Python function.

report_failure(ts, state, trade, stop_on_execution_failure)[source]#

What to do if trade fails.

Parameters:
  • ts (datetime) – Wall clock time

  • state (State) – The strategy state

  • trade (TradeExecution) – Which trade had reverted transactions

  • stop_on_execution_failure (bool) – If set, abort with exceptionm instead of trying to keep going.

Return type:

None