Fig. 01
Try it
AI-generated voice and avatar
01
Problem & approach
The problem
Watch dozens of currency pairs around the clock, run a strategy on each in parallel, and report changes without tripping the messaging API’s rate limits.
The approach
An extensible object-oriented design: an abstract BaseStrategy class keeps strategy logic apart from the core engine (threading, API clients, persistence), and a producer–consumer pipeline feeds one dispatcher.
02
How it works
- ArchitectureAn abstract BaseStrategy class decouples the core engine (threading, API clients, persistence) from the strategy logic.
- ProducersStrategy threads monitor 68+ currency pairs concurrently in a producer–consumer pattern.
- DispatcherA master dispatcher batches updates into single Telegram broadcasts to avoid a thundering herd, with exponential backoff and random jitter for HTTP 429 rate limits.
- DeploymentRuns on AWS EC2 under PM2, with a thread-safe SQLite ledger for crash recovery and a branch-based Git workflow with GitHub Actions for CI/CD.
03
Results & stack
- 68+
- pairs monitored at once
- 24/7
- on AWS EC2
- Python
- Threads
- SQLite
- Oanda v3 API
- Telegram
- AWS EC2
- PM2
- GitHub Actions
