Carles Sentis
|
e5c105fd5b
Integrate market monitoring with trading engine for enhanced data caching - Connected MarketMonitor to TradingEngine for shared access to cached positions, orders, and balance data. Updated InfoCommands to utilize cached data for auto-syncing positions, improving efficiency and responsiveness. Enhanced logging for better traceability of data usage and cache updates.
|
преди 4 дни |
Carles Sentis
|
a210658664
Enhance orphaned position handling in InfoCommands and MarketMonitor - Updated logic to utilize exchange data for entry prices, improving accuracy in position management. Added detailed notifications with exchange-provided risk metrics, including unrealized P&L, leverage, and liquidation prices. Enhanced logging for better traceability of auto-sync actions and fallback mechanisms.
|
преди 4 дни |
Carles Sentis
|
e70404443d
Implement entry price estimation for orphaned positions - Added functionality to estimate entry prices for orphaned positions in both InfoCommands and MarketMonitor. This enhancement improves the accuracy of position management by providing fallback mechanisms for cases where the entry price is zero, including checks for recent fills, current market prices, and bid/ask averages. Enhanced logging for better traceability of the estimation process.
|
преди 4 дни |
Carles Sentis
|
ab63095d50
Implement auto-sync for orphaned positions in trading bot - Enhanced InfoCommands and MarketMonitor to automatically detect and sync orphaned positions without trade lifecycle records. This update improves position management accuracy and user notifications, ensuring all positions are tracked effectively. Added logging for better traceability of auto-sync actions.
|
преди 4 дни |
Carles Sentis
|
3d5e262812
Update stop loss activation logic in MarketMonitor - Changed the method for checking pending stop losses from active trades to the trades table, aligning with the new unified trades management approach. This update enhances the priority handling of stop loss activations, improving overall trading accuracy.
|
преди 4 дни |
Carles Sentis
|
3cb4cb089b
Refactor trading logic to unify position tracking and enhance command handling - Updated the trading bot to utilize a unified trades table as the single source of truth for open positions, improving accuracy in position management. Enhanced InfoCommands to provide detailed statistics on active trades and open positions, including improved error handling and user notifications. Updated TradingEngine and TradingStats to support new lifecycle management for trades, streamlining the overall trading process.
|
преди 4 дни |
Carles Sentis
|
75edbe2ebf
Refactor trading bot initialization and enhance command handling - Updated the TelegramTradingBot to initialize MarketMonitor with a notification manager for improved alerting. Added a new /cycles command in InfoCommands to display trade cycle statistics, enhancing user insights into trading performance. Improved error handling and logging for better traceability in command execution.
|
преди 4 дни |
Carles Sentis
|
ee48c1c8ac
Enhance documentation and project structure - Added a comprehensive documentation index for quick navigation and updated project structure details to reflect new data storage and enhanced stop loss management features. Improved clarity in module responsibilities and included new integration notes for unified position tracking.
|
преди 4 дни |
Carles Sentis
|
5321ab723d
Enhance stop loss cancellation logic in MarketMonitor - Implemented edge case handling to wait for potential fills before cancelling stop losses. Added checks for recent fills to prevent unnecessary cancellations, improving order management accuracy. Enhanced logging for better traceability of order statuses and actions taken.
|
преди 4 дни |
Carles Sentis
|
c31e47261d
Refactor order status update logic in TradingEngine and TradingStats - Updated the method for updating order statuses to include a new parameter for setting the exchange order ID directly. Improved logging to provide clearer feedback on order updates, enhancing overall traceability and debugging capabilities.
|
преди 4 дни |
Carles Sentis
|
6e7803b227
Refactor stop loss retrieval logic in InfoCommands - Enhanced the method for identifying pending stop losses by first retrieving all pending trigger orders and then filtering them based on type and parent order reference ID. Improved logging for better debugging and clarity in matching stop losses to their respective orders.
|
преди 4 дни |
Carles Sentis
|
14ae0d889a
Enhance stop loss order logic in TradingEngine - Implemented smart stop loss functionality to determine order type (market or limit) based on current market price relative to stop price. Improved logging for order placement and error handling, ensuring clarity in execution status and enhancing overall stop loss management.
|
преди 4 дни |
Carles Sentis
|
a4cee8b091
Refactor stop loss retrieval in InfoCommands - Updated the method for fetching pending stop losses to streamline the logic and improve readability. The new implementation directly filters pending stop losses by parent order reference ID, enhancing clarity in the code and maintaining consistent user notifications regarding stop loss statuses.
|
преди 4 дни |
Carles Sentis
|
c76ba56746
Refactor price formatting in InfoCommands and TradingCommands - Integrated the PriceFormatter for consistent price display across order and trade notifications. Updated relevant sections to utilize the formatter, enhancing clarity in user messages regarding order details and trade confirmations.
|
преди 4 дни |
Carles Sentis
|
cf7ab53c06
Implement price formatting utilities and integrate into trading commands - Added a new PriceFormatter class for handling price formatting with exchange-specific precision. Updated InfoCommands and TradingCommands to utilize the new formatter for displaying prices, enhancing clarity and consistency in user notifications. Initialized the formatter in TradingEngine to ensure proper integration across the application.
|
преди 4 дни |
Carles Sentis
|
3849a02442
Enhance stop loss management in MarketMonitor - Updated orphaned stop loss cleanup logic to consider parent order statuses, improving accuracy in identifying and cancelling orphaned stop losses. Enhanced logging to provide clearer reasons for cancellations and updated documentation for the cleanup method to reflect new behavior.
|
преди 4 дни |
Carles Sentis
|
2da0a71b51
Refactor MarketMonitor to enhance external trade processing - Updated the method for checking external trades to utilize the TradingEngine's recent fills retrieval. Improved timestamp handling and state management by loading the last processed trade time from the database. Enhanced logging for better debugging and added a safety net for activating pending stop losses based on recent fills, ensuring robust trade management.
|
преди 4 дни |
Carles Sentis
|
d0ffa6537a
Refactor trading command notifications to accommodate new response format - Updated long, short, and exit order success notifications to extract and display order details from the new response structure. Enhanced backward compatibility by creating mock order objects for notifications, ensuring consistent user feedback and improved clarity in order status messages.
|
преди 4 дни |
Carles Sentis
|
1e20e93542
Improve gitignore rules for data directory to ensure all data files are ignored
|
преди 4 дни |
Carles Sentis
|
f9395fb099
Remove data files from git tracking - should be ignored
|
преди 4 дни |
Carles Sentis
|
c6d9f2f62a
Add initial price alarms JSON and trading stats SQLite file - Created a new JSON file for price alarms to manage alarm states and added a SQLite database for trading statistics, enhancing data persistence and management. Updated trading commands to reflect changes in order cancellation notifications, including detailed summaries of cancelled orders.
|
преди 4 дни |
Carles Sentis
|
938e56a535
Refactor reset_data.sh and trading_bot.py for SQLite integration - Updated reset_data.sh to remove legacy JSON files and handle SQLite database cleanup. Modified trading_bot.py to check for SQLite database existence instead of JSON files, enhancing statistics persistence reporting. Adjusted management_commands.py to reflect the new SQLite file structure for trading stats. Improved trading_stats.py to rename order_id to exchange_fill_id and added linked_order_table_id for better data management.
|
преди 4 дни |
Carles Sentis
|
5ae857d2d6
Enhance order management and stop loss functionality - Updated InfoCommands to display pending stop losses linked to orders, improving user visibility. Refactored TradingCommands to ensure accurate stop loss notifications and confirmations. Transitioned MarketMonitor to utilize SQLite for state management, replacing file-based persistence, and added comprehensive logging for order status updates. Improved TradingEngine to handle order placements and cancellations more robustly, including linked stop loss management, ensuring better tracking and execution of trades.
|
преди 4 дни |
Carles Sentis
|
2218d5a8b5
Enhance error handling and logging in HyperliquidClient and TradingEngine - Implemented a method to extract specific error messages from exceptions in HyperliquidClient, improving clarity in error logging. Updated TradingEngine to handle order placement responses more robustly, ensuring detailed error messages are logged and returned for better debugging and user feedback.
|
преди 4 дни |
Carles Sentis
|
4e09f49d4e
Fix logging format in TradingStats - Updated the logging statement to ensure proper formatting of the average entry price, improving clarity in position enhancement messages.
|
преди 4 дни |
Carles Sentis
|
7c5d17afb9
Refactor TradingStats to use SQLite for data management - Transitioned from JSON file storage to an SQLite database for improved data integrity and performance. Enhanced methods for recording trades, balances, and adjustments, ensuring robust handling of transactions. Updated statistics calculations to leverage database queries, streamlining data retrieval and improving overall efficiency.
|
преди 4 дни |
Carles Sentis
|
a10e7c34aa
Implement state management for MarketMonitor - Added functionality to load and save the market monitor's state to a JSON file, ensuring persistence of the last processed trade time. Enhanced timestamp handling for incoming trades to support various formats and ensure UTC consistency. Improved logging for state loading and saving processes to aid in debugging and monitoring.
|
преди 4 дни |
Carles Sentis
|
bb8b71a7ef
Refactor order execution logic in TradingEngine - Updated the execute_long_order and execute_short_order methods to improve handling of limit and market orders. Enhanced error handling for price validation and order placement, ensuring robustness against invalid inputs and improving logging for better traceability of order processing.
|
преди 4 дни |
Carles Sentis
|
484514e0f9
Update days active calculation in TradingStats - Replaced the calculation of active days with a direct reference to the 'days_active' field in the basic data structure, improving code clarity and maintainability.
|
преди 4 дни |
Carles Sentis
|
cd95517fcf
Refactor price data handling in InfoCommands - Updated the retrieval of market data prices to handle None values gracefully, ensuring robust float conversion. This improves the reliability of price calculations and enhances overall data integrity in the bot's operations.
|
преди 4 дни |