Repository navigation
Release date: 2026-10-11
This is a cumulative release covering all changes since the last published tag, v0.6.1. It includes the v0.7.0 transition to async services, PostgreSQL, and Saxo WebSocket streaming, along with the subsequent trading, reporting, watchlist, signal-handling, and deployment changes.
v0.7.0 Foundation: Async Architecture, PostgreSQL & Streaming
Breaking and Migration Changes
- Replaced embedded DuckDB with PostgreSQL 16 and an async
asyncpgconnection pool. The DuckDB config is no longer used at runtime;src/database/migration.pymigrates existing data. - Added the
position_monitorservice. Position checks no longer depend on the scheduler's 7-second REST polling job. - Split RabbitMQ routing into
trading-signalsfor trade signals andtrading-opsfor operational commands. - Added required
postgresqlandtrade.config.general.streamingconfiguration and the PostgreSQL and Position Monitor deployment services. The migration guide below contains the v0.6.x upgrade steps.
Async Trading Services
- Moved service-critical paths to
async/await. The Saxo HTTP client useshttpx.AsyncClientwith HTTP/2, async rate limiting, and token refresh. - Added async instrument search, order placement, position queries, trading orchestration, and performance monitoring, including parallel searches and bounded-concurrency position checks.
- Reworked the Trader to consume signals with
aio-pikaand added an async Telegram sender. - Added PostgreSQL managers for orders, positions, and trade performance, with connection pooling and automatic schema creation.
Real-Time Saxo WebSocket Streaming
- Added a persistent Saxo streaming client for position subscriptions. It decodes binary and delta-compressed updates, maintains a position snapshot, and handles heartbeats, subscription resets, and disconnects.
- Added automatic reconnect with exponential backoff and message-ID resume, plus periodic WebSocket reauthorization.
- The Position Monitor evaluates streamed positions for stop-loss, take-profit, and trailing-stop rules; scheduled operational events, including daily statistics, use
trading-ops.
v0.7.0 Performance Impact
| Metric | Before (v0.6.x) | After (v0.7.0) |
|---|---|---|
| Position-check latency | Up to 7s (poll interval) | Sub-second (stream push) |
| API calls per check cycle | 3+ REST calls | 0 (data pushed by WebSocket) |
| HTTP protocol | HTTP/1.1 (requests) |
HTTP/2 (httpx) |
| Database | Embedded DuckDB | Pooled PostgreSQL |
| I/O model | Synchronous/blocking | Async (asyncio/uvloop) |
Additional Changes Since v0.6.1
- Expanded configurable risk-management and trading rules, improved instrument ranking by Bid price and InfoPrices diagnostics, and optimized async turbo-candidate validation.
- Improved PostgreSQL and streaming reliability, including consistent date/datetime normalization.
- Enhanced simulation and reporting, expanded CI and unit-test coverage, and added a trading-dashboard build script.
v0.9.0 Updates
Breaking Changes
- Signal delivery no longer uses the
trading-signalsRabbitMQ queue. The web server keeps the newest signal perindicein memory, and the async Trader polls/latest-signals(500 ms by default). Older signals for anindiceare ignored; only the latest is retained. - Legacy synchronous Saxo trading services have been removed. Integrations must use the async services in
src/trade/async_services.py.
New Features
Background Turbo Watchlists
- Added a dedicated
watchlist_manager1service that periodically selects the best turbo candidates for configured indices and directions. - Candidate prices are refreshed from Saxo's streaming API and cached for the Trader. The manager exposes health and best-candidate endpoints and reports whether cached prices are stale.
Secure Webhook Deployment
- Added Traefik as the public webhook ingress, with HTTP-to-HTTPS redirection and automatic Let's Encrypt certificates.
- Added an IP allowlist for TradingView webhook traffic.
Trading Reports and Monitoring
- Daily reports now include account balance, milestone projections, closed-trade history, and daily profit history.
- Added signal timing details and an optional early trigger for daily statistics.
Changed
- Improved async turbo candidate discovery and validation to reduce unnecessary work during instrument selection.
- Improved Saxo streaming and PostgreSQL handling, including consistent normalization of date and datetime values.
- Updated trading simulation and risk-rule logic, and expanded reporting calculations.
- Improved deployment and package-install scripts, HTTP/2 support for the async API client, and configuration handling.
Configuration and Deployment
- Add the
trade.config.watchlist_managerandtrade.config.signal_pollingsettings frometc/config_example.jsonto the deployment configuration. - Set
ACME_EMAILandAPI_DOMAINindeploy/.envto enable HTTPS certificate issuance for the webhook endpoint. - Deploy the new
watchlist_manager1service with the updated Compose configuration.