---
id: "T:cAlgo.API.HistoricalOrder"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# HistoricalOrder (interface)

Represents a historical order.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public interface HistoricalOrder
```

Available since cAlgo.API 5.1.

## Examples

C#:

```csharp
var historicalOrder = HistoricalOrders.FindLast("myLabel");
if (historicalOrder == null)
{
    Print("Order not found");
    return;
}

Print("Id: {0} | OrderType: {1} | TradeType: {2} | Status: {3} | Submitted: {4}", historicalOrder.Id, historicalOrder.OrderType, historicalOrder.TradeType, historicalOrder.Status, historicalOrder.SubmittedTime);
```

Python:

```python
historicalOrder = api.HistoricalOrders.FindLast("myLabel")
if historicalOrder is None:
    api.Print("Order not found")
else:
    api.Print(f"Id: {historicalOrder.Id} | OrderType: {historicalOrder.OrderType} | TradeType: {historicalOrder.TradeType} | Status: {historicalOrder.Status} | Submitted: {historicalOrder.SubmittedTime}")
```

## Properties

- `string Channel {get;}` — Order channel. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Channel/index.md)
- `string Comment {get;}` — Order comment. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Comment/index.md)
- `DateTime? ExpirationTime {get;}` — Order expiration time. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/ExpirationTime/index.md)
- `double? FilledQuantity {get;}` — Order filled quantity (lots). [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledQuantity/index.md)
- `DateTime? FilledTime {get;}` — Order filled time. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledTime/index.md)
- `double? FilledVolumeInUnits {get;}` — Order filled volume in units. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledVolumeInUnits/index.md)
- `bool HasTrailingStop {get;}` — Returns true if order has trailing stop loss. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/HasTrailingStop/index.md)
- `long Id {get;}` — Unique order Id. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Id/index.md)
- `string Label {get;}` — Order label. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Label/index.md)
- `HistoricalOrderType OrderType {get;}` — Order type. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/OrderType/index.md)
- `int? PositionId {get;}` — Unique position Id. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/PositionId/index.md)
- `double Quantity {get;}` — Order quantity (lots). [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Quantity/index.md)
- `HistoricalOrderStatus Status {get;}` — Order status. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Status/index.md)
- `double? StopLoss {get;}` — Order stop loss in Price. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLoss/index.md)
- `double? StopLossPips {get;}` — Order stop loss in Pips. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLossPips/index.md)
- `StopTriggerMethod? StopLossTriggerMethod {get;}` — Trigger method for order's StopLoss [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLossTriggerMethod/index.md)
- `StopTriggerMethod? StopOrderTriggerMethod {get;}` — StopOrder trigger method. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopOrderTriggerMethod/index.md)
- `DateTime SubmittedTime {get;}` — Order submitted time. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/SubmittedTime/index.md)
- `Symbol Symbol {get;}` — Order symbol. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Symbol/index.md)
- `string SymbolName {get;}` — Order symbol name. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/SymbolName/index.md)
- `double? TakeProfit {get;}` — Order take profit in Price. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TakeProfit/index.md)
- `double? TakeProfitPips {get;}` — Order take profit in Pips. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TakeProfitPips/index.md)
- `double TargetPrice {get;}` — Order target price [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TargetPrice/index.md)
- `TradeType TradeType {get;}` — Order Trade type (buy or sell) [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TradeType/index.md)
- `double VolumeInUnits {get;}` — Order volume in units. [details](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/VolumeInUnits/index.md)

