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