ALARM — price/RSI alert bot
ALARM is a service bot: it never trades. It watches a price (or an RSI value) and fires a notification the moment the value enters your configured range. Use it as the eyes of your trading — a level-touch wake-up call for you or a trigger for your own automation.
Prerequisites: the bot lifecycle — ALARM is created, started and
stopped like any bot, it just carries no deposit/orders. Required fields: type, symbol,
exchange, range, timeout.
How the range works
Think of range as an interval; the alarm fires when the value enters it. Boundaries are
lines in Fn.Format (two {timestamp: price} points;
same price twice = horizontal level):
| You set | Interval | Plain meaning |
|---|---|---|
only max |
(−∞, max] | «Tell me when the price drops to max» |
only min |
[min, +∞) | «Tell me when the price rises to min» |
min + max |
[min, max] | «Tell me when the price enters the zone» |
With range.type: "rsi" the same logic applies to the RSI indicator (add period and a
timeFrame).
Beyond price and rsi, the spec defines two more types:
range.type: "time"— fire at a specific moment: required fieldrange.time(Unix ms);range.type: "periodic"— fire on a repeating schedule: required fieldrange.period(interval in ms), optionallyrange.shift(schedule offset in ms).
Verified configs
1 — Fire once when SOL drops to 60:
{
"type": "ALARM",
"settings": {
"type": "ALARM",
"symbol": { "base": "SOL", "quote": "USDT" },
"ticker": "SOLUSDT",
"exchange": "binance-futures",
"name": "SOL ↓ 60",
"range": {
"type": "price",
"max": { "1719000000000": 60, "1721592000000": 60 }
},
"timeout": { "type": "ttl", "value": 2592000000 },
"onetime": true,
"initial": false,
"noticeLevel": 2
}
}
2 — Fire once when BTC rises to 100 000:
{
"type": "ALARM",
"settings": {
"type": "ALARM",
"symbol": { "base": "BTC", "quote": "USDT" },
"ticker": "BTCUSDT",
"exchange": "binance-futures",
"name": "BTC ↑ 100k",
"range": {
"type": "price",
"min": { "1719000000000": 100000, "1721592000000": 100000 }
},
"timeout": { "type": "ttl", "value": 2592000000 },
"onetime": true,
"initial": false,
"noticeLevel": 2
}
}
3 — Fire on every entry into the 3000–3500 zone (ETH):
{
"type": "ALARM",
"settings": {
"type": "ALARM",
"symbol": { "base": "ETH", "quote": "USDT" },
"ticker": "ETHUSDT",
"exchange": "binance-futures",
"name": "ETH zone 3000-3500",
"range": {
"type": "price",
"min": { "1719000000000": 3000, "1721592000000": 3000 },
"max": { "1719000000000": 3500, "1721592000000": 3500 }
},
"timeout": { "type": "ttl", "value": 604800000 },
"onetime": false,
"initial": false,
"noticeLevel": 1
}
}
4 — RSI oversold: SOL RSI(14) below 30 on the 1-hour timeframe:
{
"type": "ALARM",
"settings": {
"type": "ALARM",
"symbol": { "base": "SOL", "quote": "USDT" },
"ticker": "SOLUSDT",
"exchange": "binance-futures",
"name": "SOL RSI oversold",
"range": {
"type": "rsi",
"max": { "1719000000000": 30, "1721592000000": 30 },
"period": 14
},
"timeout": { "type": "ttl", "value": 604800000 },
"onetime": true,
"initial": false,
"noticeLevel": 2,
"timeFrame": 3600000
}
}
Field reference
| Field | Type | Meaning |
|---|---|---|
symbol ✳ |
object | {base, quote}; ticker must denote the same pair (base+quote concatenated) |
exchange ✳ |
string | Exchange used as the data feed |
range ✳ |
object | type: price | rsi | time | periodic · min/max: Fn.Format bounds (price/rsi) · period: RSI period (for rsi) or repeat interval in ms (for periodic, required) · time: fire time, Unix ms (for time, required) · shift: schedule offset in ms (for periodic, optional) |
timeout ✳ |
object | array | Required. TTL of the alarm, max 365 days |
onetime |
boolean, default true |
true — fire once and stop · false — fire on every crossing |
initial |
boolean, default false |
true — evaluate immediately on start; if the value is already in range, fire right away |
noticeLevel |
0 | 1 | 2 |
0 silent · 1 normal · 2 push notification |
timeFrame |
integer (ms) | Kline timeframe (needed for rsi; 60000 = 1 m) |
Pitfalls
timeoutis required here (unlike trading bots) and capped at 365 days — an alarm cannot outlive a year.onetimedefaults totrue: a zone alarm that should fire repeatedly needs an explicit"onetime": false(config 3).noticeLevelhere is 0–2 (2 = push), not the 0–3 scale of the trading bots.initial: true+ a value already inside the range = instant fire on start. Leave itfalseif you only care about new crossings.- Boundaries are Fn.Format: string keys in milliseconds, exactly two points. A sloped line (different prices) gives you a moving alert level — e.g. an alarm on a trendline break.
- Difference from terminal alarms: in the UI, a zone alarm (parallel channel/rectangle) fires twice — on entering and on leaving the zone. The API ALARM behaves like the UI: the number of events depends on how the zone is defined; if the price is already inside the zone at start, there is a single event. This does not affect alarm creation.
Verified against API spec v2.0.0 · 2026-07-12