---
id: "P:cAlgo.API.PendingOrders.Count"
kind: "property"
type: "T:cAlgo.API.PendingOrders"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Count/"
---

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

# PendingOrders.Count

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

## Count

Total number of pending orders

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
int Count {get;}
```

Python:

```python
api.PendingOrders.Count: int
```

### Returns

`int` — 

### Examples

C#:

```csharp
if (PendingOrders.Count == 0)
    PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, "myLabel");
```

Python:

```python
if api.PendingOrders.Count == 0:
    api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, "myLabel")
```

