# Price alerts

> Get a message by email, Telegram or WhatsApp when a symbol crosses a price.

URL: https://renzo-digital.com/docs/resources/price-alerts

A price alert watches one symbol and messages you when its price crosses your target. Alerts belong to one customer. Every call except the stop link needs a token and a username on the account. Your plan sets how many alerts you may hold.

## Endpoints

| Operation | What it does | Auth |
| --- | --- | --- |
| `GET /api/v1/price-alerts` | List your alerts, newest first, each with the current price. Cursor-paginated. | Token and username |
| `POST /api/v1/price-alerts` | Create an alert. Answers `201`. Declares `Idempotency-Key`. | Token and username |
| `GET /api/v1/price-alerts/{alert_id}` | Read one alert. | Token and username |
| `PATCH /api/v1/price-alerts/{alert_id}` | Change target, direction, mode or channels, or pause or resume. | Token and username |
| `DELETE /api/v1/price-alerts/{alert_id}` | Delete an alert. Answers `204`. Past fires stay. | Token and username |
| `GET /api/v1/price-alerts/fired` | List the times your alerts fired, newest first. Cursor-paginated. | Token and username |
| `POST /api/v1/price-alerts/stop` | Stop an alert from the link in its message: `{"token": "..."}`. | None |

Without a username, calls that need one answer `409` [`profile_incomplete`](https://renzo-digital.com/docs/error-codes#profile_incomplete). See [Account](https://renzo-digital.com/docs/resources/account). `POST /api/v1/price-alerts` declares an `Idempotency-Key` header, so a retry replays the first answer. Any mutating call accepts it. See [Idempotency](https://renzo-digital.com/docs/concepts/idempotency).

## Example: create an alert

Find the symbol `id` with `GET /api/v1/symbols`, see [Symbols](https://renzo-digital.com/docs/resources/symbols).

```bash tab="curl"
curl -X POST "$BASE/api/v1/price-alerts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: 5b1d7c0e-3f9a-4c7e-8d21-0a6f4b9e1c33" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol_id": "ed6621c0-5979-526b-8ba1-452bf82b80c0",
    "direction": "above",
    "target_price": "200.00",
    "mode": "single",
    "channels": ["telegram", "email"]
  }'
```

```python tab="Python"
import os

import requests

BASE = os.environ["BASE"]
TOKEN = os.environ["TOKEN"]

answer = requests.post(
    f"{BASE}/api/v1/price-alerts",
    headers={
        "Authorization": f"Bearer {TOKEN}",
        "Idempotency-Key": "5b1d7c0e-3f9a-4c7e-8d21-0a6f4b9e1c33",
    },
    json={
        "symbol_id": "ed6621c0-5979-526b-8ba1-452bf82b80c0",
        "direction": "above",
        "target_price": "200.00",
        "mode": "single",
        "channels": ["telegram", "email"],
    },
)
answer.raise_for_status()
print(answer.json())
```

```js tab="Node.js"
const { BASE, TOKEN } = process.env;

const answer = await fetch(`${BASE}/api/v1/price-alerts`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${TOKEN}`,
    "Idempotency-Key": "5b1d7c0e-3f9a-4c7e-8d21-0a6f4b9e1c33",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    symbol_id: "ed6621c0-5979-526b-8ba1-452bf82b80c0",
    direction: "above",
    target_price: "200.00",
    mode: "single",
    channels: ["telegram", "email"],
  }),
});
if (!answer.ok) throw new Error(`HTTP ${answer.status}`);
console.log(await answer.json());
```

The answer is `201`:

```json title="Response"
{
  "id": "6ca4458e-77ae-5441-b992-1b389fe10186",
  "symbol": {
    "id": "ed6621c0-5979-526b-8ba1-452bf82b80c0",
    "slug": "aapl-nasdaq",
    "ticker": "AAPL",
    "display_name": "Apple Inc.",
    "exchange": "NASDAQ",
    "asset_class": "equity",
    "is_active": true
  },
  "direction": "above",
  "target_price": 200,
  "mode": "single",
  "channels": ["telegram", "email"],
  "state": "active",
  "current_price": 187.42,
  "price_observed_at": "2026-11-04T15:42:10Z",
  "price_replayed": false,
  "distance_percent": 6.71,
  "created_at": "2026-11-04T13:30:00Z",
  "updated_at": "2026-11-04T13:30:00Z"
}
```

An alert also has `pause_reason`, `paused_at` and `last_fired_at`. They are `null` until they apply.

## Rules and edge cases

- **Fields.** `direction` is `above` (fires when the price rises to the target) or `below` (when it falls). `mode` is `single` (fires once, the default) or `continuous` (fires on every new cross).
- **Target.** Send `target_price` as a string to keep every digit. It must be above 0, with at most 30 digits and 12 decimals.
- **Channels.** `channels` is a list of `telegram`, `whatsapp` and `email`, one to three entries. Email needs no setup. Telegram and WhatsApp need a connected chat. WhatsApp also needs a paid plan: from the free plan the call answers `403` [`notification_channel_locked`](https://renzo-digital.com/docs/error-codes#notification_channel_locked). A connected customer on a paid plan can always choose WhatsApp, even while Meta has paused the alert template. In that time the alert still fires, the WhatsApp message is skipped, and the other channels still send. `price_alerts_available` on `GET /api/v1/notifications/channels` is `false` for `whatsapp` in that time, so you can warn the customer. A channel that is not connected answers `422` [`price_alert_channel_not_connected`](https://renzo-digital.com/docs/error-codes#price_alert_channel_not_connected). See [Notifications](https://renzo-digital.com/docs/resources/notifications).
- **Message gaps.** A `continuous` alert is checked every 5 minutes. Email and WhatsApp get at most one message an hour for the same alert.
- **States.** `state` is `active`, `paused` or `done`. `done` is a `single` alert that has fired. `PATCH` accepts `state` of `active` or `paused` only.
- **Re-arming.** Sending `state: "active"` on a fired alert re-arms it. Changing the target or direction resets the last fire, so the alert may fire again at once, but a `done` alert comes back only with `state: "active"`. Changing `mode` re-arms nothing.
- **Paused by Renzo.** An alert pauses by itself when no chosen channel can reach you any more, or when its symbol is retired. `pause_reason` says why: `user`, `inactive`, `no_channel` or `symbol_inactive`.
- **Plan limit.** The cap is the `price_alerts.max_active` capability. Active and paused alerts both count. The free plan allows 5. One more answers `409` [`price_alert_limit_reached`](https://renzo-digital.com/docs/error-codes#price_alert_limit_reached), with `limit`, `held` and `product_code` in the body. Re-arming a fired alert counts against the cap too. See [Plans and limits](https://renzo-digital.com/docs/concepts/plans-and-limits).
- **No price yet.** `current_price`, `price_observed_at` and `distance_percent` are `null` when no price is available. `distance_percent` is (target - price) / price x 100. A positive value means the target is above the price.
- **Filters.** The list takes `symbol_id` and `state`. The fired list takes `symbol_id` and `alert_id`. `limit` defaults to 20 and may not pass 100. See [Pagination](https://renzo-digital.com/docs/concepts/pagination).
- **Fires.** Each fire holds the target and the `price` at that time, and `deliveries` with a `channel` and a `status`: `sent`, `sending`, `failed` or `skipped`. `alert_id` is `null` once the alert was deleted.
- **Delete.** Deleting an alert keeps its fires in the fired list.
- **Stop link.** The link in an alert message carries a signed token. `POST /api/v1/price-alerts/stop` pauses that alert and answers `200` with `alert_id`, `ticker`, `direction`, `target_price` and `state`. A second click answers the same. A damaged token answers `400` [`price_alert_stop_token_invalid`](https://renzo-digital.com/docs/error-codes#price_alert_stop_token_invalid).
- **Other people's alerts.** An ID that is not yours answers `404` [`price_alert_not_found`](https://renzo-digital.com/docs/error-codes#price_alert_not_found), the same as an unknown ID.

## Errors

| Code | Status | When |
| --- | --- | --- |
| [`price_alert_limit_reached`](https://renzo-digital.com/docs/error-codes#price_alert_limit_reached) | 409 | Your plan's alert limit is reached. |
| [`price_alert_not_found`](https://renzo-digital.com/docs/error-codes#price_alert_not_found) | 404 | No alert with that ID is yours. |
| [`price_alert_symbol_not_found`](https://renzo-digital.com/docs/error-codes#price_alert_symbol_not_found) | 404 | No active symbol has this ID. |
| [`price_alert_channel_not_connected`](https://renzo-digital.com/docs/error-codes#price_alert_channel_not_connected) | 422 | A chosen channel, such as Telegram or WhatsApp, is not connected. |
| [`notification_channel_locked`](https://renzo-digital.com/docs/error-codes#notification_channel_locked) | 403 | WhatsApp needs a paid plan. |
| [`price_alert_stop_token_invalid`](https://renzo-digital.com/docs/error-codes#price_alert_stop_token_invalid) | 400 | The stop link is damaged or not issued by Renzo. |
| [`profile_incomplete`](https://renzo-digital.com/docs/error-codes#profile_incomplete) | 409 | The account has no username yet. |

Sign-in and request errors, such as [`token_expired`](https://renzo-digital.com/docs/error-codes#token_expired) and [`validation_failed`](https://renzo-digital.com/docs/error-codes#validation_failed), can come from any call. See [Errors](https://renzo-digital.com/docs/concepts/errors).

## Reference

- [Price alerts in the API reference](https://renzo-digital.com/docs/api#tag/price-alerts)
