# Rules and alerts

> Your own conditions on one coin or any coin, checked every minute on multi-venue data. They fire in-app and as browser notifications, and can open a paper trade.

A **rule** is one condition on one coin, or on any coin with Pro. Deskr's engine checks every rule **every minute** on its own multi-venue data. When the condition turns true, the rule fires: it writes an alert and, if you asked, opens a [paper trade](/guides/paper-trading).

Manage rules at [Rules & alerts](https://deskr.trade/app/rules), from **Your rules** on the board, or by typing into the board's command box.

## Conditions

| Condition | Fires when |
|---|---|
| **Leaves zone** | Price leaves its 50% or 80% [zone](/guides/zones) |
| **OI jump** | Open interest moves by at least N% within the hour |
| **Funding** | Annualised funding reaches ±N% a year |
| **Price** | Price goes above or below a level |
| **Trend flip** | Deskr's 4h-based trend read flips up, down, or either way |
| **OI regime** | The OI regime over 1h, 4h or 24h becomes new longs, short covering, new shorts or long unwind |
| **Signal** | Any [signal](/guides/signals) fires, or one kind: breakout, volume, OI, funding or zone |

## How firing works

- Rules fire on the **rising edge**: when the condition goes from false to true, not every minute while it stays true.
- After firing, a rule waits **60 minutes** before it can fire again.
- Each rule can be switched on and off without deleting it.

## Optional paper trade

A rule can open a paper trade when it fires. You choose the direction (long, short, or *with* the signal), how long to hold, and the stop and target in %. The default is: with the signal, hold 24h, stop 2%, target 3%.

## Where alerts show up

| Channel | Status |
|---|---|
| In-app alerts | Live |
| Browser notifications | Live, while a Deskr tab is open. Allow them in Settings → Alerts. |
| Discord | Live, all plans. Paste a channel webhook on the Rules page, then turn Discord on for each rule you want there. |
| Telegram | Coming soon, through Deskr's own bot. |
| TradingView | Live, all plans: incoming alerts through your own webhook URL (see below). |
| Email | Not available yet. On the [roadmap](/roadmap) as "Alerts everywhere". |

### Discord

1. In Discord, open the channel's settings → **Integrations** → **Webhooks** → **New webhook**, and copy the webhook URL.
2. On the Deskr **Rules** page, paste it under **Send alerts to Discord or Telegram** and save. Deskr sends a test message right away.
3. In **Your rules**, press **Discord** on each rule that should post there.

Only `https://discord.com/api/webhooks/…` (or `discordapp.com`) links are accepted. The link is stored encrypted and only its last digits are shown again. Treat it like a password: anyone who has it can post in that channel. Messages are written in your Deskr language, never mention `@everyone` or anyone else, and are capped at 20 an hour. If Discord says the webhook is gone three times in a row, Deskr turns Discord delivery off and tells you in the inbox.

## TradingView webhook

You can send TradingView alerts into Deskr. On the **Rules** page, press **Create webhook URL** and copy the URL: it is shown only once, and anyone who has it can post alerts to your account (press **New URL** to replace it, which stops the old one at once). In TradingView's alert dialog, open **Notifications**, tick **Webhook URL** and paste it.

Every alert lands in your Deskr inbox. Plain text works. To name the coin and the side, put JSON in TradingView's **Message** box:

```json
{"ticker": "{{ticker}}", "side": "buy", "message": "{{strategy.order.comment}} at {{close}}", "paper": true, "stop": 2, "tp": 3, "hold": 24}
```

- `ticker`: TradingView tickers such as `BINANCE:BTCUSDT.P` are mapped to the Deskr coin (`BTC`).
- `side`: `buy`/`long` or `sell`/`short`.
- `paper: true` opens a **paper** trade, only when **Let TradingView alerts open paper trades** is switched on, on coins your plan covers, within your paper position limit. `stop` and `tp` are in %, `hold` in hours. Nothing is ever sent to an exchange.

Limits: messages up to 4 KB, 10 alerts a minute, and 50 a day on Free or 500 a day on Pro and Team. Deskr keeps only a fingerprint (hash) of the URL's secret, so it can't show the URL again.

## Limits

| Plan | Rules |
|---|---|
| Free | 3 |
| Pro | 25, including **any coin** rules |
| Team | 50 |

You need to be signed in to save rules.
