Get all open orders
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.
Method
tm.get_all_open_orders()
Inputs
None
Outputs
List of all open orders.
Example usage
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)}")