Repository navigation
v0.6.0
Changelog: WATA v0.6.0 (2025-05-15)
This release introduces critical changes to the application's directory structure and authentication process, alongside numerous refactorings and improvements for stability and maintainability. Please read the BREAKING CHANGES section very carefully and follow the migration steps to ensure a smooth upgrade.
💥 BREAKING CHANGES 💥
-
Application Directory Structure Overhaul:
- The internal application directory structure has been significantly refactored to support versioning and improve organization.
- Old structure (simplified):
/app/(containingsrc,etc,var) - New structure (simplified):
- Application code:
/app/wata/<version>/(e.g.,/app/wata/0.6.0/src,/app/wata/0.6.0/deploy, docker files, etc.) - Persistent user data:
/app/wata/etc/(forconfig.json) and/app/wata/var/(for database, logs, tokens). - Environment files
.env, is now located in/app/wata/.
- Application code:
- Old structure (simplified):
- ACTION REQUIRED: MANUAL MIGRATION OF CONFIGURATION AND DATA IS NECESSARY.
- Failure to migrate will result in wata starting as if it's a fresh installation (new web token, empty database, default config).
- Migration Steps:
- Stop wata:
watastop - Backup your existing
/app/etcand/app/vardirectories. This is crucial. - Carefully move/copy your existing configuration and variable data into the new top-level persistent directories:
/app/wata/etc/(forconfig.json),/app/wata/var/(for database, logs, tokens) and/app/wata/.envfor Environment variables.
- Adjust ownership/permissions if necessary.
- Stop wata:
- This change impacts Docker volume paths and internal script logic (
f129873,3e746a8,386807e,e5837a7).
- The internal application directory structure has been significantly refactored to support versioning and improve organization.
-
Saxo Bank Authentication (
watasaxoauth) Process Update:- The
watasaxoauthcommand-line utility for obtaining Saxo Bank API tokens has been refactored. - It no longer accepts the authorization code as a command-line argument. Instead, it will securely prompt you to paste the authorization code obtained from Saxo's website.
- ACTION REQUIRED: When re-authenticating or setting up initially, run
watasaxoauthand follow the on-screen prompts. Do not try to pass the code as an argument. - This enhances security by preventing the code from appearing in shell history (
6617036,ed890bb).
- The
✨ Added
- Trading Operations:
- Added
BuySellparameter toMarketOrderand updatedOrderServiceto utilize it, allowing explicit specification of order direction (af0f8f6). - Added
signal_idto the trading action schema and enhanced message logging to include it for better traceability (8a3d3b9). - Implemented retry mechanism for scenarios where Bid data might be temporarily missing from Saxo API responses, improving resilience (
3eb6100).
- Added
- Error Handling:
- Introduced custom exceptions for trading operations (e.g.,
NoMarketAvailableException) for more specific error management (63e438a,3ebe312).
- Introduced custom exceptions for trading operations (e.g.,
- Dependencies:
- Added
tenacity==9.1.2for more robust retry logic (a11760e).
- Added
🔄 Changed
- Core Application & Services:
- Refactored
TradingOrchestratorandPerformanceMonitorfor an enhanced trade execution flow, better integration with database persistence, and improved error handling (f47e306). - Refactored trading action handling in
main.pyand related services for improved error management, logging, and streamlined message processing (8333f08,80b11a8). - Enhanced market data cleaning logic to better handle missing
Quotefields in API responses (99e968a,3ebe312). - Refactored
api_actions.pyfor better class separation and enhanced bid data retrieval logic with improved error handling and filtering (2363921,9187e23).
- Refactored
- Notifications & Messaging:
- Temporarily disabled rule violation notifications: The message delivery for rule violations has been commented out. This functionality will be revisited for future configurable options (
cf36ae8). - Enhanced Telegram message formatting for better readability and standardized section titles using a new
MessageHelperclass (63e438a,c1d13a1). - Improved timestamp handling in messages, adding time difference calculations and better signal section formatting (
cce0059). - RabbitMQ messages are now conditionally sent based on the count of closed positions (
026a9db).
- Temporarily disabled rule violation notifications: The message delivery for rule violations has been commented out. This functionality will be revisited for future configurable options (
- Deployment & Installation:
- Deployment scripts (
install_package.sh,package.sh,update_rabbit_password.sh) have been significantly refactored for improved error handling, path consistency (reflecting new directory structure), and streamlined operations (386807e,e5837a7,af40bb8,76b0733,3e746a8). - Removed log file creation from
install_package.shto streamline logging setup, relying on the application's logging configuration (f21b5dd). - Dockerfile: Removed Google Chrome installation steps and updated Chromedriver installation logic. Corrected
WATA_CONFIG_PATHenvironment variable (c425cb9). - Simplified RabbitMQ queue declaration by removing explicit durability and prefetch settings, relying on defaults or broker configuration (
c270c8d).
- Deployment scripts (
- Configuration & Internal Logic:
- Clarified comments regarding timezone handling and encryption key initialization (
36fc37e,eabf5a1). - Enhanced clarity and consistency in internal exception messages and constructors (
c9051aa).
- Clarified comments regarding timezone handling and encryption key initialization (
- Dependencies:
- Upgraded
python-multipartto0.0.20(a11760e). - Updated
httpcoreto version1.0.9(f9f897d). - Bumped
h11from0.14.0to0.16.0(via dependabot) (929ff36).
- Upgraded
- Documentation (README.md):
- Revised documentation section for clarity, enhanced contribution guidelines, and corrected documentation website link (
ecf3b9f,599e9e8). - Enhanced documentation section title with an emoji for better visibility (
428a961).
- Revised documentation section for clarity, enhanced contribution guidelines, and corrected documentation website link (
🐛 Fixed
- Corrected the configuration file path used in
update_rabbit_password.shto honor theWATA_CONFIG_FILEenvironment variable (76b0733).
(Many refactoring commits also implicitly fix minor issues or improve robustness, which are covered under "Changed").
Reminder: The directory structure change (BREAKING CHANGE #1) and the Saxo authentication update (BREAKING CHANGE #2) require your immediate attention upon upgrading. Please follow the migration steps carefully.