Price Alerts
Let users tell the platform "ping me when BTC hits $70k" β no trade, no lock, just a notification. Built on the existing watcher and notification fan-out.
What a Price Alert Is
A price alert is a passive trigger your users set on any trading pair. They pick a target price, the platform watches the live market, and the moment that target is crossed your user gets a notification β by email, Telegram, or both. No order is placed and no balance is ever locked. Alerts are purely informational; the user decides on their own whether to act on them.
π Quick facts
- Channels: Email and / or Telegram, picked per alert
- Auto direction: the platform figures out whether the user is waiting for a pump (target above current) or a dip (target below current)
- One-shot: when the target is hit the alert fires once and moves to history β no spam if the price keeps oscillating
- Per-user limit: up to 10 active alerts at a time (history is unlimited)
- No financial risk: nothing is locked, nothing is traded β alerts only notify
- Polling cadence: the same 30-second tick used by the conditional-order watcher
Where Users Find It
From the Trade page
On every trading-pair page the user sees a compact "π Price Alert" box next to the Conditional Order widget. Three fields: target price, an optional note, two channel checkboxes (email / Telegram). One click on Create alert saves it without leaving the trade view.
From the User Profile
The profile has a dedicated π Price Alerts tab. Users see every alert they have ever created β active, fired and cancelled β with the symbol, direction, target, channels, dates and the price the platform recorded at firing. Active alerts have a Cancel button.
How Direction Is Decided
The user types one number β the target. The platform reads the current market price at the moment they save and works out the rest:
- Target is higher than current β the user is waiting for a pump. The alert fires when the price rises to the target.
- Target is lower than current β the user is waiting for a dip. The alert fires when the price falls to the target.
A target that is within 0.01% of the current price is rejected (would fire instantly and is almost certainly a typo).
How Firing Works
A background tick runs every 30 seconds (the same one used for conditional orders). It groups every active alert by symbol, fetches the live price once per symbol, and evaluates every alert against that price. When a target is crossed:
- The alert moves from active to fired and the fired price is stored alongside the timestamp.
- An entry is written to the user's activity log so the event shows up in their Login History & Activities tab.
- The notification is dispatched through the regular fan-out: the user gets an email and / or Telegram message depending on what they ticked, your admin Telegram gets a mirror, your admin email stays quiet (price alerts are medium-priority).
- The alert does NOT re-arm. If the user wants another alert at the same level, they create a fresh one.
The notification text is intentionally human:
π Price alert hit: BTCUSDT
BTC rose to your target of 70,000 USDT (now at 70,128 USDT).
Your note: take-profit zone
Alerts vs Conditional Orders
The two features look similar but solve different problems. Pick whichever fits the trader's intention.
| Price Alert | Conditional Order | |
|---|---|---|
| What happens at trigger | A notification is sent | A real order is placed on the exchange |
| Balance lock | None | Required (BTC for sell, quote for buy) |
| Best for | "Tell me whenβ¦" | "Do this whenβ¦" |
| User has to act after fire? | Yes, manually | No, exchange fills it |
| Risk | Zero | Whatever the order entails |
| Re-arms automatically? | No, one-shot | No, fires once unless re-created |
Notification Behaviour
Alerts use the same four-channel system documented on the Notifications page. Specifically:
- User email β sent if the user ticked Email when creating the alert
- User Telegram β sent if they ticked Telegram and connected their Telegram from Profile β Security
- Admin Telegram β always sent (live operations feed)
- Admin email β not sent (medium priority; the daily digest mentions them in aggregate)
Operator Notes
β οΈ Things to know
- Per-user limit is 10 active alerts. The limit is high enough for any reasonable trader but blocks runaway-script abuse. Cancelled and fired alerts do not count.
- The watcher polls Binance. The same endpoint used by conditional orders. If you are testing on Testnet the alerts watch Testnet prices; switch to Production from General Settings for live trading.
- SMTP and Telegram bots must be configured for users to actually receive the notification. See the Notifications page for setup.
- Activity log records every fire. Even if both notification channels fail (e.g. user's Telegram is muted, SMTP is down), the activity entry in the user's profile is created β they can still see the event happened.
Troubleshooting
"My alert never fired even though the price clearly hit the target."
The watcher fires when the price meets or crosses the target. A short candle wick that bounced back before the next 30-second poll can be missed. This is the trade-off of polling vs. websocket streaming β kept this way to be gentle on Binance rate limits.
"I want the alert to keep firing every time price crosses the target."
By design alerts are one-shot to avoid spam. To get repeating fires, the user can create the same alert again right after the first one fires.
"User says they didn't get the Telegram message."
Make sure the user has connected their Telegram from Profile β Security β Connect Telegram and that they ticked Telegram on the alert. Until they connect, the platform has no chat to message.
"User says they hit the 10-alert limit."
Cancelled and fired alerts do not count toward the limit. Ask them to cancel the alerts they no longer need β they stay in the history.