If you searched for how to build a Discord options alert bot or get options flow alerts in Slack, here is the complete answer: the alert engine runs server-side and pushes to you, so your "bot" reduces to one small webhook relay you can host on any serverless function.
The one-paragraph answer: define an alert rule against live options analytics (for example "SPY dealer gamma regime flips negative" or "spot within 0.5% of the 0DTE magnet"), attach your relay's URL as the webhook target, and the platform evaluates the rule continuously and POSTs a signed JSON payload when it fires - edge-triggered, so you get one message at the moment of the cross, not a spam stream. Your relay verifies the HMAC signature and forwards a formatted message to Discord or Slack. Total code you own: about 30 lines.
~30
lines of relay code - the entire "bot"
10
ready-made templates: walls, regime flips, IV, VRP, 0DTE magnet, P/C, VIX, earnings
HMAC-SHA256
every webhook signed - your channel cannot be spoofed
0
polling loops, scrapers, or market-data servers to babysit
Why not a polling bot?
The usual Discord alert bot polls an API on a timer, compares values, and posts on change. It has three chronic failure modes: it misses the cross whenever the move happens between polls, it double-fires when the value oscillates around the threshold, and it dies silently when the host machine sleeps. The server-side alert engine solves all three: evaluation runs next to the data, firing is edge-triggered (the transition fires, not the state - "regime is negative" fires once at the flip, not every evaluation cycle), a per-rule cooldown (default 60 minutes) absorbs oscillation, and a 5-fires-per-day auto-pause stops a broken threshold from flooding your channel. Delivery state is tracked per fire, for email and webhook separately.
Step 1 - Create the alert rule
Rules are managed at /v1/alerts with your API key. The fastest path is a template; the same request body accepts a custom condition tree when you outgrow them:
import requests
BASE, H = "https://lab.flashalpha.com", {"X-Api-Key": KEY}
rule = {
"name": "spy-regime-flip",
"templateKey": "regime_flip_negative", # dealer gamma regime turns negative
"scope": { "type": "symbols", "symbols": ["SPY"] },
"emailEnabled": True, # keep the email as your audit trail
"webhookUrl": "https://your-relay.example.com/fa-alert",
"cooldownMinutes": 60
}
r = requests.post(f"{BASE}/v1/alerts", headers=H, json=rule)
print(r.json()) # returns the rule with its id and webhook secret
Templates cover the workhorse setups: price_above_call_wall / price_below_put_wall, regime_flip_negative / regime_flip_positive, iv_spike, vrp_rich, zero_dte_magnet_near, pc_volume_extreme, vix_above, and earnings_move, each with sensible parameter defaults you can override via templateParams. Scope a rule to specific symbols or to a watchlist; the condition language underneath is the same one the screener uses, so anything you can screen on, you can alert on.
Step 2 - The relay: verify, format, forward
When the rule fires, the platform POSTs JSON to your webhook URL and signs the raw body with your rule's secret, sending the signature in the X-FlashAlpha-Signature header (HMAC-SHA256). Your relay verifies it, formats a message, and forwards to a Discord webhook URL. This is the entire bot:
import hashlib, hmac, json, os
from flask import Flask, request, abort
import requests
app = Flask(__name__)
SECRET = os.environ["FA_WEBHOOK_SECRET"] # from the rule you created
DISCORD = os.environ["DISCORD_WEBHOOK_URL"] # Server Settings -> Integrations -> Webhooks
@app.post("/fa-alert")
def fa_alert():
body = request.get_data() # raw bytes - sign-verify BEFORE parsing
sig = request.headers.get("X-FlashAlpha-Signature", "")
expected = hmac.new(SECRET.encode(), body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(sig, expected):
abort(401)
event = json.loads(body) # ruleId, name, firedAt, symbols, snapshot
requests.post(DISCORD, json={
"embeds": [{
"title": f"\U0001F6A8 {event.get('name', 'FlashAlpha alert')}",
"description": "\n".join(
f"**{sym}** " + " ".join(f"{k}: {v}" for k, v in fields.items())
for sym, fields in event.get("snapshot", {}).items()
) or ", ".join(event.get("symbols", [])),
"color": 0x145DA1
}]
})
return {"ok": True}
Host it anywhere that serves HTTPS - a $0 serverless function (Cloudflare Workers, Vercel, Lambda) is plenty; there is no state to keep. The Slack version changes only the last call: POST {"text": f"..."} to a Slack incoming-webhook URL. A Telegram version is the Bot API's sendMessage. One relay can fan out to all three.
Step 3 - Operate it honestly
- Verify the signature on the raw body, always. An unauthenticated relay lets anyone who finds the URL post fake signals into your trading channel.
hmac.compare_digest, not ==.
- Treat the payload as data, not advice. The webhook carries the rule identity, matched symbols and the metric snapshot at fire time; what your channel does with it is your logic. Keep the email enabled as an audit trail - delivery states are tracked separately per channel.
- Respect the cooldown semantics. Edge-triggered + cooldown means one message per regime change, which is what a channel full of traders actually wants. If a rule hits the 5-fires/day auto-pause, the threshold is too tight - widen it rather than fighting the pause.
- Webhook failures back off. Consecutive delivery failures are counted per rule; a relay that starts 500ing will stop receiving. Keep the function dumb and fast, do formatting only.
What to alert on (the setups channels actually run)
| Channel use case | Template | Why it works in chat |
| Regime channel ("are dealers long or short gamma?") | regime_flip_negative / _positive on SPY/QQQ | Fires a handful of times a month; every fire is discussion-worthy. Background: dealer polarity. |
| 0DTE room | zero_dte_magnet_near (pct 0.3-0.5) on SPY/SPX | The magnet approach is the day's actionable moment - how the magnet works. |
| Breakout watch | price_above_call_wall / price_below_put_wall | Wall breaks are the levels everyone drew that morning - walls explained. |
| Premium sellers' room | vrp_rich, iv_spike | Fires exactly when selling conditions appear, silent otherwise. |
| Macro channel | vix_above, pc_volume_extreme | Rare, high-signal pings the whole server sees. |
Tiering, stated plainly
Alerting is the live screener wearing a pager, and it is in open beta: every plan can arm alerts today. Free and Basic get 2 rules from the template library on a 15-minute cadence. Growth gets 20 rules, the custom condition language, a 5-minute cadence and webhook delivery. Alpha raises that to per-cycle evaluation, 100 rules, formula fields and universe-wide scope (alert on "any symbol where..." rather than a fixed list).
For the bot in this guide specifically, you need Growth or above: webhooks are the paid delivery channel, so a Free or Basic account can arm alerts and receive them by email, but cannot post them into Discord or Slack. When the beta ends the whole feature becomes Growth and above.
Frequently asked questions
How do I get GEX or gamma alerts into Discord?
Create a server-side alert rule on the gamma metric you care about (regime flip, wall break, 0DTE magnet) with your relay's URL as the webhook target, and forward the signed payload to a Discord webhook. No polling bot is involved: the platform evaluates continuously and POSTs on the edge - the code you own is a ~30-line HTTPS function.
Can I run options flow and volatility alerts in Slack or Telegram?
Yes - the delivery is a generic signed webhook, so the same relay posts to Slack incoming webhooks or Telegram's Bot API. Rules cover dealer positioning, IV, VRP, put/call extremes, VIX levels and earnings setups, scoped to your symbols or watchlist.
How do I verify the webhook is really from FlashAlpha?
Every delivery is signed: HMAC-SHA256 over the raw request body with your rule's secret, sent in the X-FlashAlpha-Signature header. Recompute and compare with a constant-time comparison before parsing. Reject anything unsigned - an unauthenticated alert channel is an invitation to spoof trades into your server.
Do I need to host a server for this?
No. The relay is stateless - any serverless function that accepts HTTPS POSTs works, typically on a free tier. The alert engine, data, evaluation and retries all run on the platform side.
Why did my alert only fire once when the condition stayed true?
By design: firing is edge-triggered on the transition into the condition, with a per-rule cooldown (default 60 minutes) and a 5-fires/day auto-pause. A channel wants "the flip just happened", not the same fact every five minutes. Widen thresholds if you hit the auto-pause; re-arm happens when the condition resets.
The scraper-and-timer Discord bot is dead weight: the alert engine already watches the dealer book continuously, fires on the edge, signs its deliveries, and tracks per-channel state - your entire bot is a 30-line relay on a free serverless function. Alerts are in open beta on every plan and webhook delivery is Growth and above; manage rules from the profile Alerts tab or the API. Related: automated market commentary, options data for AI agents, and scored unusual-flow signals for the channel your bot posts into.