Hugging Face Hub
Required for the Python bot. Not used by the Go binary. The Python bot stores all ML model binaries (.pkl and .onnx) on Hugging Face Hub and pulls the latest models at startup. The Go binary embeds all models at compile time and does not connect to Hugging Face Hub at runtime.
Setup
- Create a free account at huggingface.co
- Create a new model repository (private)
- Generate an access token with
writepermission at Settings → Access Tokens - Add to your
.env:
Usage
.pkl and .onnx files from models/ plus the models/model_compat.json and models/risk_metadata.json metadata files.
What is stored
Supabase
Optional. Supabase stores trade logs, open position snapshots, and bot status. The website dashboard reads from Supabase for trade history display.Setup
- Create a free project at supabase.com
- Run the schema migrations from
supabase/migrations/ - Add to your
.env:
Schema
Data integrity rules
Trade reconciliation
After every sync_fallback or estimation path,_reconcile_trade_bg(ticket, ...) fires in the background. It retries _get_deals_for_position() every 60 seconds for up to 4 hours, then overwrites Supabase with real broker deal data.
RoboForex can delay closing deal history by hours for manual (mobile) closes. The reconciliation loop handles this automatically.
Telegram
Optional but strongly recommended. Telegram sends trade alerts, weekly optimize reports, and error notifications.Setup
- Create a bot with @BotFather and copy the token
- Get your chat ID (send a message to your bot, then check
https://api.telegram.org/bot<token>/getUpdates) - Add to your
.env:
Notification types
Telegram commands
The bot responds to commands sent from your chat:trading/telegram_commands.py.
Service dependency summary
- Python bot
- Go binary