Configurable push notifications for trade signals generated by the agentic trading system.
This feature sends push notifications to users when new trade signals are created or when existing signals are updated to BUY or SELL. Users can configure their notification preferences to control which signals they receive.
Users can customize their notification preferences with the following settings:
Notifications are sent when:
agentic_trading collection with a BUY or SELL signalNotifications are delivered as Rich Push Notifications containing:
This actionable format allows users to assess opportunities without opening the app fully.
Each notification includes:
New in v0.26.0, Expanded in v0.32.0
Rich notifications are now supported for:
Enhancements in v0.32.0:
Notifications now support rich media content to provide immediate context without opening the app.
When a user taps on a trade signal notification, the app will:
File: functions/src/trade-signal-notifications.ts
Two Firestore triggers:
onTradeSignalCreated - Listens for new documents in agentic_tradingonTradeSignalUpdated - Listens for document updates in agentic_tradingBoth triggers:
Models:
TradeSignalNotificationSettings - Stores user notification preferencesUser model as tradeSignalNotificationSettings fieldWidget:
TradeSignalNotificationSettingsWidget - UI for configuring notification preferencesNavigation:
NavigationStatefulWidget handles incoming notification payloads and routes the user to the InstrumentWidget with the appropriate symbol and signal data. This ensures a seamless transition from notification to analysis.Notification settings are stored in the user document:
{
"tradeSignalNotificationSettings": {
"enabled": true,
"signalTypes": ["BUY", "SELL"],
"symbols": ["AAPL", "TSLA"],
"intervals": ["1d", "1h"],
"includeHold": false,
"minConfidence": 0.7
}
}
import 'package:robinhood_options_mobile/widgets/trade_signal_notification_settings_widget.dart';
// Navigate to settings
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TradeSignalNotificationSettingsWidget(
user: currentUser,
userDocRef: userDocReference,
),
),
);
final updatedUser = currentUser;
updatedUser.tradeSignalNotificationSettings = TradeSignalNotificationSettings(
enabled: true,
signalTypes: ['BUY', 'SELL'],
symbols: ['AAPL'],
intervals: ['1d'],
includeHold: false,
minConfidence: 0.8,
);
await firestoreService.updateUser(userDocRef, updatedUser);
cd src/robinhood_options_mobile/functions
npm install
firebase deploy --only functions:onTradeSignalCreated,functions:onTradeSignalUpdated
The rules are already updated in firebase/firestore.rules. Deploy with:
cd src/robinhood_options_mobile
firebase deploy --only firestore:rules
// In Firebase Console or using admin SDK
db.collection('signals').add({
symbol: 'AAPL',
signal: 'BUY',
interval: '1d',
timestamp: Date.now(),
confidence: 0.85,
price: 150.00
});
Check Firebase Functions logs:
firebase functions:log --only onTradeSignalCreated,onTradeSignalUpdated
The Android notification uses the trade_signals channel. Ensure this channel is created in your Android app:
// In MainActivity.kt or similar
val channel = NotificationChannel(
"trade_signals",
"Trade Signals",
NotificationManager.IMPORTANCE_HIGH
)
channel.description = "Notifications for buy and sell trade signals"
notificationManager.createNotificationChannel(channel)
Ensure your iOS app is configured for push notifications:
Potential improvements: