Releases: IOITI/WATA
WATA v0.6.1
Changelog: WATA v0.6.1 (2025-07-26)
This is a maintenance release that addresses a bug in instrument price retrieval, preventing the ineligibility of certain instruments to be traded due to mixed asset types in search results. The fix ensures that all relevant price data is retrieved correctly, enhancing the reliability of trade execution. It also includes several dependency and dashboard improvements.
π₯ BREAKING CHANGES π₯
There are no breaking changes in this release.
π Changed
- Dashboard:
- The monitoring dashboard has received several UI/UX enhancements for a better user experience (
2719010,44b6c4f):- Switched to a dark mode theme for improved readability.
- Refined performance chart titles.
- Enhanced styling for cards and added a hover effect to the navigation bar.
- The monitoring dashboard has received several UI/UX enhancements for a better user experience (
- Dependencies:
- Bumped
requestsfrom2.32.2to2.32.4(e450079). - Bumped
urllib3from2.2.2to2.5.0(f2107ed).
- Bumped
π Fixed
- Critical Fix for Price Retrieval:
- Fixed a critical bug in the
InstrumentServicewhere fetching detailed prices (InfoPrices) would fail if the search results contained a mix of asset types (e.g.,WarrantOpenEndKnockOutandMiniFuture). The service now correctly groups instruments by theirAssetTypebefore making API requests, ensuring all price data is retrieved reliably and preventing potential trade execution failures. Logging for this process has also been improved (7f7bddc).
- Fixed a critical bug in the
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.
v0.5.0
Changelog: WATA v0.5.0
This release introduces significant changes, including a major configuration overhaul and enhanced security features. Please review the BREAKING CHANGES section carefully before upgrading.
We are also excited to announce our new dedicated documentation site: https://ioiti.github.io/wata-docs/
π₯ BREAKING CHANGES π₯
-
Configuration File Overhaul (
config.json):- The structure of the
tradesection withinconfig.jsonhas been significantly refactored to improve organization, validation, and allow for more granular control over trading parameters. - Action Required: Users must update their
config.jsonfile to match the new structure. Please refer to the v0.5.0 Configuration Guide for the updated format and new options. - Key changes include:
- Restructured
trade.configinto sub-sections:turbo_preference,buying_power,position_management, andgeneral. - Introduced new configuration options like
timezone,max_day_loss_percent, turboprice_range,stoploss_percent,max_profit_percent, API limits, retry settings, and more. - Removed the
trade.rules.profit_per_daysrule; its functionality is now part of the newday_tradingrule type undertrade.rules. - Added new rule types:
day_trading,signal_validation, andmarket_hours.
- Restructured
- The structure of the
-
Webhook Token Management:
- Webhook authentication token management has been redesigned for enhanced security. Tokens are now stored encrypted in the file specified by
webserver.persistant.token_path. - A new
app_secretkey has been added to thewebserversection inconfig.json. Action Required: You must set a strong, unique secret key forwebserver.app_secretin yourconfig.json. - Action Required: The previous method of storing/retrieving the webhook token is no longer valid. Users must use the new
watawebtokencommand-line tool to view their current token or generate a new one after upgrading. Update your webhook sender (e.g., TradingView alerts) with the token obtained fromwatawebtoken.- View token:
watawebtoken - Generate new token:
watawebtoken --new
- View token:
- Refer to the Webhook Token Management documentation.
- Webhook authentication token management has been redesigned for enhanced security. Tokens are now stored encrypted in the file specified by
-
Saxo Authentication Configuration:
- The
usernameandpasswordfields have been removed from theauthentication.saxosection inconfig.json. Authentication now relies solely on the persisted OAuth token flow managed internally.
- The
β¨ Added
- New Trading Rules & Configuration:
- Introduced
day_tradingrule with parameters for daily profit target, max daily loss percentage, threshold to stop entering trades, and end-of-day position closing time (68767aa,adbd05a). - Added
signal_validationrule to reject signals older than a configurable duration (4136376,037c39b). - Implemented
market_hoursrule to define trading start/end times and a "risky" trading period (4136376). - Added timezone configuration (
general.timezone) for consistent time handling across the application (0808892,42001d7). - Added
turbo_preference.price_rangeto filter instruments by price (a07adc3). - Added
position_management.performance_thresholdsforstoploss_percentandmax_profit_percent(ec74fe4). - Added
buying_power.max_account_funds_to_use_percentageto control capital allocation per trade.
- Introduced
- Security Enhancements:
- Implemented secure, encrypted storage for webhook authentication tokens (
15e6b5a). - Introduced the
watawebtokencommand-line utility for managing webhook tokens (6446ffa).
- Implemented secure, encrypted storage for webhook authentication tokens (
- Configuration Validation: Added validation checks for the
config.jsonstructure and values (cb47632). - Documentation:
- Launched a new dedicated documentation website: https://ioiti.github.io/wata-docs/ (
77522bb, etc.). - Added comprehensive Getting Started Guide and FAQ (
914d2f2,ab8afd9). - Included architecture flowcharts and improved visual elements in documentation (
e960b0b,c5199f0,c78d426,9234619). - Enhanced README with badges, clearer setup instructions, risk warnings, and how-to guides (
b0b1037,7c52903,76ac5e0,47d0f37).
- Launched a new dedicated documentation website: https://ioiti.github.io/wata-docs/ (
- Trading Logic: Instrument sorting and filtering now uses the 'Bid' price instead of 'Mid' price for potentially more accurate selection (
a6f2943).
π Changed
- Refactoring:
- Refactored Saxo API token management and initialization logic for improved reliability and clarity (
f383e69,5747519,da628ae). - Refactored trading rule checks and signal action processing (
bc7c06a). - Refactored position performance checking logic for efficiency (
ec74fe4). - Refactored configuration management (
958599f,45f509d).
- Refactored Saxo API token management and initialization logic for improved reliability and clarity (
- API Interaction: Increased the frequency of the
ping_saxo_apijob to every 15 seconds (abd0dee). - Logging:
- Enhanced logging details for signal actions, timestamp validation, and token retrieval (
bc7c06a,037c39b,8a37b40). - Adjusted some log levels for better verbosity control (
8a37b40).
- Enhanced logging details for signal actions, timestamp validation, and token retrieval (
- User Experience: Added an emoji to the RabbitMQ readiness notification (
6b940db).
β Removed
- Removed
usernameandpasswordfields fromauthentication.saxoinconfig.json(See Breaking Changes). - Removed the
trade.rules.profit_per_daysconfiguration (functionality merged intoday_tradingrule). - Deleted unused
trade/__init__.pyfile (e2b5b1b).
π Fixed
- Fixed Docker exec command interpretation and an import path for
WebServerToken(8d878c1). - Corrected case sensitivity issues in trading rule method calls (
1ee5338). - Fixed a logging variable name related to sorted data count (
aed79af).
Please update your configuration and webhook tokens as described in the BREAKING CHANGES section. Consult the new documentation site for detailed guidance.