Set Up Crypto Regime Shift Webhooks in 5 Minutes
The most valuable moment in crypto is when the market regime changes — bull to bear, bear to chop, chop to bull. If you find out 30 minutes late, you've already lost money.
Regime webhooks notify you the instant a regime transition is detected. Here's how to set them up.
Prerequisites
- A Regime Pro account (start free trial)
- A webhook URL (Slack, Discord, or your own server)
Step 1: Register a Webhook
``bash
curl -X POST https://getregime.com/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/regime-webhook",
"events": ["regime.change"]
}'
`
Step 2: Receive Events
When the regime changes, you'll receive a POST request:
`json
{
"event": "regime.change",
"data": {
"regime": "bear",
"previousRegime": "chop",
"confidence": 0.87,
"timestamp": "2026-03-26T14:30:00Z",
"signals": {
"bullish": 1,
"bearish": 4,
"neutral": 1
}
},
"signature": "sha256=abc123..."
}
`
Slack Integration
Use a Slack incoming webhook URL directly:
`bash
curl -X POST https://getregime.com/api/v1/webhooks \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
"events": ["regime.change"]
}'
`
Discord Integration
Same approach with a Discord webhook:
`bash
curl -X POST https://getregime.com/api/v1/webhooks \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://discord.com/api/webhooks/YOUR/WEBHOOK",
"events": ["regime.change"]
}'
`
Verify Signatures
All webhooks are signed with HMAC-SHA256. Verify them to prevent spoofing:
`python
import hmac
import hashlib
def verify_webhook(payload, signature, secret):
expected = hmac.new(secret.encode(), payload.encode(), hashlib.sha256).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)
`
Use Case: Auto-Adjust Trading Bot
`python
from flask import Flask, request
app = Flask(__name__)
@app.route("/regime-webhook", methods=["POST"])
def handle_regime_change():
data = request.json["data"]
if data["regime"] == "bear" and data["confidence"] > 0.8:
# Close all longs, reduce exposure
close_all_positions()
send_alert(f"BEAR REGIME at {data['confidence']:.0%} — positions closed")
elif data["regime"] == "bull":
# Resume normal trading
enable_trading()
return "", 200
``
Full webhook docs: getregime.com/quickstart
Example receiver: github.com/Thordersonjg/regime-webhook-alerts