---
id: "M:cAlgo.API.PriceAlerts.Find(System.Int64)"
kind: "method"
type: "T:cAlgo.API.PriceAlerts"
url: "https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Find/"
---

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

# PriceAlerts.Find

Member of [PriceAlerts](https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/index.md).

## Find(long id)

Finds a price alert by its Id.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised.

C#:

```csharp
PriceAlert Find(long id)
```

Python:

```python
api.PriceAlerts.Find(id: int) -> PriceAlert | None
```

### Parameters

- `id` (`long`, Python `int`): The Id of the price alert.

### Returns

`PriceAlert` — PriceAlert if it exists, null otherwise.

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
var added = PriceAlerts.Add(Symbol, Symbol.Bid + 50 * Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);
var priceAlert = PriceAlerts.Find(added.Id);
if (priceAlert != null)
    Print("Found alert {0} at {1}", priceAlert.Id, priceAlert.Price);
```

Python:

```python
added = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + 50 * api.Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)
priceAlert = api.PriceAlerts.Find(added.Id)
if priceAlert is not None:
    api.Print(f"Found alert {priceAlert.Id} at {priceAlert.Price}")
```

