---
id: "M:cAlgo.API.PendingOrders.FindById(System.Int32)"
kind: "method"
type: "T:cAlgo.API.PendingOrders"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/FindById/"
---

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

# PendingOrders.FindById

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

## FindById(int id)

Find PendingOrder by Id.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
PendingOrder FindById(int id)
```

Python:

```python
api.PendingOrders.FindById(id: int) -> PendingOrder | None
```

### Parameters

- `id` (`int`, Python `int`): PendingOrder Id

### Returns

`PendingOrder` — PendingOrder if found otherwise null.

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
const int orderId = 123456;
var order = PendingOrders.FindById(orderId);
if (order != null)
    Print("Order {0} target price: {1}", orderId, order.TargetPrice);
```

Python:

```python
orderId = 123456
order = api.PendingOrders.FindById(orderId)
if order is not None:
    api.Print(f"Order {orderId} target price: {order.TargetPrice}")
```

