---
id: "P:cAlgo.API.HistoricalOrder.Id"
kind: "property"
type: "T:cAlgo.API.HistoricalOrder"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Id/"
---

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

# HistoricalOrder.Id

Member of [HistoricalOrder](https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/index.md).

## Id

Unique order Id.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
long Id {get;}
```

Python:

```python
historicalOrder.Id: int
```

### Returns

`long` — 

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
var order = HistoricalOrders.FindLast("myLabel");
if (order != null)
    Print("Order Id: {0}", order.Id);
```

Python:

```python
order = api.HistoricalOrders.FindLast("myLabel")
if order is not None:
    api.Print(f"Order Id: {order.Id}")
```

