---
id: "T:cAlgo.API.DealStatus"
kind: "enum"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/"
---

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

# DealStatus (enum)

Represents the different status of a deal.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public enum DealStatus
```

Available since cAlgo.API 5.1.

## Examples

C#:

```csharp
foreach (var position in Positions)
{
    foreach (var deal in position.Deals)
    {
        if (deal.Status == DealStatus.PartiallyFilled)
            Print("Deal {0} of position {1} was only partially filled", deal.Id, position.Id);
    }
}
```

Python:

```python
for position in api.Positions:
    for deal in position.Deals:
        if deal.Status == DealStatus.PartiallyFilled:
            api.Print(f"Deal {deal.Id} of position {position.Id} was only partially filled")
```

## Values

- `DealStatus.Filled` — Filled.
- `DealStatus.PartiallyFilled` — Partially filled.
- `DealStatus.Rejected` — Rejected.
- `DealStatus.Error` — Error.
- `DealStatus.Missed` — Missed.
- `DealStatus.InternallyRejected` — Internally rejected.

