Skip to content

Algo.HistoricalOrders

property · Algo · cAlgo.API.Internals Since 5.1

DesktopCLICloud

Provides access to historical orders.

Definition

public HistoricalOrders HistoricalOrders {get;}
api.HistoricalOrders: HistoricalOrders

Returns HistoricalOrders

Examples

var lastOrder = HistoricalOrders.FindLast("myLabel", SymbolName);
if (lastOrder != null)
    Print("Order {0} status: {1}, submitted at {2}", lastOrder.Id, lastOrder.Status, lastOrder.SubmittedTime);
lastOrder = api.HistoricalOrders.FindLast("myLabel", api.SymbolName)
if lastOrder is not None:
    api.Print(f"Order {lastOrder.Id} status: {lastOrder.Status}, submitted at {lastOrder.SubmittedTime}")