The get_all_pending_orders function returns a list of all pending orders. This is useful if you want to check if there are any pending orders before placing a new order.
get_all_pending_orders
tm.get_all_pending_orders()
None
List of all pending orders.
import tradomate as tm @tm.strategy()def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData): # ... Your strategy code here # Get all pending orders pending_orders = tm.get_all_pending_orders() # Print the number of pending orders tm.log(f"Pending orders: {len(pending_orders)}")