Skip to content

v0.6.0

Choose a tag to compare

@IOITI IOITI released this 15 May 20:09
· 44 commits to main since this release

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 💥

  1. Application Directory Structure Overhaul:

    • The internal application directory structure has been significantly refactored to support versioning and improve organization.
      • Old structure (simplified): /app/ (containing src, 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/ (for config.json) and /app/wata/var/ (for database, logs, tokens).
        • Environment files .env, is now located in /app/wata/.
    • 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:
        1. Stop wata: watastop
        2. Backup your existing /app/etc and /app/var directories. This is crucial.
        3. Carefully move/copy your existing configuration and variable data into the new top-level persistent directories:
          • /app/wata/etc/ (for config.json), /app/wata/var/ (for database, logs, tokens) and /app/wata/.env for Environment variables.
        4. Adjust ownership/permissions if necessary.
    • This change impacts Docker volume paths and internal script logic (f129873, 3e746a8, 386807e, e5837a7).
  2. Saxo Bank Authentication (watasaxoauth) Process Update:

    • The watasaxoauth command-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 watasaxoauth and 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).

✨ Added

  • Trading Operations:
    • Added BuySell parameter to MarketOrder and updated OrderService to utilize it, allowing explicit specification of order direction (af0f8f6).
    • Added signal_id to 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).
  • Error Handling:
    • Introduced custom exceptions for trading operations (e.g., NoMarketAvailableException) for more specific error management (63e438a, 3ebe312).
  • Dependencies:
    • Added tenacity==9.1.2 for more robust retry logic (a11760e).

🔄 Changed

  • Core Application & Services:
    • Refactored TradingOrchestrator and PerformanceMonitor for an enhanced trade execution flow, better integration with database persistence, and improved error handling (f47e306).
    • Refactored trading action handling in main.py and related services for improved error management, logging, and streamlined message processing (8333f08, 80b11a8).
    • Enhanced market data cleaning logic to better handle missing Quote fields in API responses (99e968a, 3ebe312).
    • Refactored api_actions.py for better class separation and enhanced bid data retrieval logic with improved error handling and filtering (2363921, 9187e23).
  • 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 MessageHelper class (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).
  • 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.sh to 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_PATH environment variable (c425cb9).
    • Simplified RabbitMQ queue declaration by removing explicit durability and prefetch settings, relying on defaults or broker configuration (c270c8d).
  • 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).
  • Dependencies:
    • Upgraded python-multipart to 0.0.20 (a11760e).
    • Updated httpcore to version 1.0.9 (f9f897d).
    • Bumped h11 from 0.14.0 to 0.16.0 (via dependabot) (929ff36).
  • 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).

🐛 Fixed

  • Corrected the configuration file path used in update_rabbit_password.sh to honor the WATA_CONFIG_FILE environment 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.