Context
Currently, signals are only written to QuestDB metrics. The admin portal polls QuestDB every 10s to display them. For real-time display, we need signals published to Redis Pub/Sub so they can be streamed to the frontend instantly.
Requirements
- When a strategy generates a signal, publish it to Redis channel
bot:{bot_id}:signals
- Message format: JSON with timestamp, symbol, exchange, market_type, signal value, reference_price, price, take, stop, group_name, comment, strategy_name
- Publishing should be fire-and-forget (non-blocking) — don't let Redis Pub/Sub failures affect trading
- Use existing Redis connection from bot config (
REDIS_URL in bot-config secret)
Notes
- Keep existing QuestDB metric writes — Redis Pub/Sub is additive
- Consider batching if signal rate is very high (unlikely for most strategies)
Acceptance Criteria
Context
Currently, signals are only written to QuestDB metrics. The admin portal polls QuestDB every 10s to display them. For real-time display, we need signals published to Redis Pub/Sub so they can be streamed to the frontend instantly.
Requirements
bot:{bot_id}:signalsREDIS_URLin bot-config secret)Notes
Acceptance Criteria
/bots/{id}/signalsresponse)