tensortrade.orders.broker module

class tensortrade.orders.broker.Broker(exchanges)[source]

Bases: tensortrade.orders.order_listener.OrderListener, tensortrade.base.core.TimeIndexed

A broker for handling the execution of orders on multiple exchanges. Orders are kept in a virtual order book until they are ready to be executed.

cancel(order)[source]
exchanges

The list of exchanges the broker will execute orders on.

Return type:List[ForwardRef]
executed

The dictionary of orders the broker has executed since resetting, organized by order id

Return type:Dict[str, Order]
on_fill(order, exchange, trade)[source]
reset()[source]
submit(order)[source]
trades

The dictionary of trades the broker has executed since resetting, organized by order id.

Return type:Dict[str, ForwardRef]
unexecuted

The list of orders the broker is waiting to execute, when their criteria is satisfied.

Return type:List[Order]
update()[source]