tensortrade.oms.orders.order_listener module

class tensortrade.oms.orders.order_listener.OrderListener[source]

Bases: object

A callback class for an order.

on_cancel(order: Order) → None[source]

Callback for an order after cancellation.

Parameters:order (Order) – The cancelled order.
on_complete(order: Order) → None[source]

Callback for an order after being completed.

Parameters:order (Order) – The completed order.
on_execute(order: Order) → None[source]

Callback for an order after execution.

Parameters:order (Order) – The executed order.
on_fill(order: Order, trade: Trade) → None[source]

Callback for an order after being filled.

Parameters:
  • order (Order) – The order being filled.
  • trade (Trade) – The trade that is filling the order.