HistoricalOrderStatus
enum cAlgo.API Since 5.1
DesktopCLICloud
Represents the status of HistoricalOrder.
Definition
public enum HistoricalOrderStatus
Namespace: cAlgo.API · Group: Historical Orders
Examples
foreach (var order in HistoricalOrders)
{
if (order.Status == HistoricalOrderStatus.Filled)
Print("Order {0} filled at {1}", order.Id, order.FilledTime);
else if (order.Status == HistoricalOrderStatus.Expired || order.Status == HistoricalOrderStatus.Cancelled)
Print("Order {0} did not fill: {1}", order.Id, order.Status);
}
for order in api.HistoricalOrders:
if order.Status == HistoricalOrderStatus.Filled:
api.Print(f"Order {order.Id} filled at {order.FilledTime}")
elif order.Status == HistoricalOrderStatus.Expired or order.Status == HistoricalOrderStatus.Cancelled:
api.Print(f"Order {order.Id} did not fill: {order.Status}")
Values
| Name | Value | Description |
|---|---|---|
Filled | 0 | Order filled |
Expired | 1 | Order expired |
Created | 2 | Order created |
Accepted | 3 | Order accepted |
Error | 4 | Order error |
Cancelled | 5 | Order cancelled |