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

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

# PendingOrder.TradeType

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

## TradeType

Specifies whether this order is to buy or sell.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
TradeType TradeType {get;}
```

Python:

```python
pendingOrder.TradeType: TradeType
```

### Returns

`TradeType` — 

### Examples

C#:

```csharp
var buyOrders = PendingOrders.Count(order => order.TradeType == TradeType.Buy);
Print("Pending buy orders: {0}", buyOrders);
```

Python:

```python
buyOrders = len([order for order in api.PendingOrders if order.TradeType == TradeType.Buy])
api.Print(f"Pending buy orders: {buyOrders}")
```

