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