Commit Graph

1091 Commits

Author SHA1 Message Date
700d975da7 Implement on-chain token balance retrieval and enhance SpotBot logging
- Added a new method in IWeb3ProxyService to retrieve token balances directly from the blockchain, ensuring accurate decimal handling.
- Updated ExchangeService to utilize the new on-chain balance method, replacing the previous balance retrieval logic.
- Enhanced SpotBot logging to provide clearer warnings when token balances are significantly lower than expected, and to log cases of excess token balances.
- Introduced a new API endpoint for fetching token balances on-chain, improving the overall functionality of the service.
2026-01-05 20:30:24 +07:00
25a2b202a1 Enhance SpotBot logging and orphaned position handling
- Updated SpotBot to log detailed information when detecting small token balances, indicating potential gas reserves or dust.
- Introduced a minimum threshold for orphaned positions, improving decision-making on whether to open new positions.
- Enhanced logging for potential zombie positions, providing clearer warnings when token balances are missing.
- Improved force close logging to clarify the status of remaining balances after attempts to clear them.
2026-01-05 19:49:59 +07:00
e880dea126 Enhance FuturesBot logging and code readability
- Updated FuturesBot logging to include a prefix indicating the bot type for better clarity in logs.
- Refactored signal retrieval code for improved readability by formatting the method call across multiple lines.
- Minor whitespace adjustments to enhance code consistency.
2026-01-05 19:11:04 +07:00
f578d8dc22 Refactor SpotBot position history logging
- Updated SpotBot to log detailed information when a closing position is found in the history, including position direction and dates.
- Enhanced logging for scenarios where no closing position is found or when position history is unavailable, improving clarity on position status.
- Removed outdated log messages to streamline the logging process.
2026-01-05 18:58:27 +07:00
13474b6abb Update LLM 2026-01-05 17:36:19 +07:00
fb3a628b19 Update llm prompt sys 2026-01-05 06:23:54 +07:00
3c8242c88a Implement force closing of remaining balance in SpotBot
- Added a new method to force close any remaining balance in a trading position if it was not fully closed.
- Enhanced logging to provide detailed information during the force close process, including current price checks and retry attempts.
- Implemented error handling to manage potential failures during the force close operation, ensuring manual intervention is flagged when necessary.
2026-01-05 06:04:18 +07:00
d53b6eee20 Update LlmService to prioritize Gemini as the default provider for BYOK and adjust provider selection logic
- Changed the default LLM provider for BYOK from Claude to Gemini.
- Updated the provider selection priority to Gemini > OpenAI > Claude for improved service efficiency.
- Removed redundant gemini provider check from the SelectProvider method to streamline the logic.
2026-01-05 05:41:48 +07:00
531ebd2737 Enhance LlmController with detailed data analysis workflow and proactive tool usage
- Expanded system message to include a comprehensive critical analysis workflow for data retrieval and analysis.
- Added specific guidelines for retrieving complete data and providing in-depth analysis for backtests, bundles, and indicators.
- Emphasized the importance of proactive engagement and multiple tool iterations to ensure thorough responses.
- Updated tool usage instructions to improve clarity and effectiveness in user interactions.
2026-01-05 00:33:28 +07:00
c78aedfee5 Enhance LlmController with caching and adaptive iteration logic
- Introduced IMemoryCache to cache available MCP tools for improved performance and reduced service calls.
- Updated system message construction to provide clearer guidance on LLM's domain expertise and tool usage.
- Implemented adaptive max iteration logic based on query complexity, allowing for more efficient processing of user requests.
- Enhanced logging to include detailed iteration information and improved context trimming to manage conversation length effectively.
2026-01-04 23:49:50 +07:00
073111ddea Implement iterative tool calling in LlmController for enhanced response accuracy
- Added support for iterative tool calling in LlmController, allowing multiple rounds of tool execution until a final answer is reached.
- Updated system message to provide clearer guidance on proactive tool usage and response expectations.
- Enhanced logging to track iterations and tool execution results, improving debugging and user feedback.
- Ensured that the final response is returned even if the maximum iterations are reached, maintaining user engagement.
2026-01-04 23:33:55 +07:00
a227c72e1f Enhance trading bot functionality and LLM system message clarity
- Added BotTradingBalance property to UserStrategyDetailsViewModel for better tracking of bot allocations.
- Updated DataController to include BotTradingBalance in the response model.
- Improved LlmController by refining the system message to ensure LLM understands its response capabilities and tool usage.
- Introduced new MCP tools for running and analyzing bundle backtests, enhancing backtesting capabilities for users.
- Implemented security measures in BotTools to ensure users can only access their own bots, improving data privacy.
2026-01-04 23:26:59 +07:00
df27bbdfa1 Add system message to LLM requests and improve indicator type resolution
- Introduced a system message in LlmController to clarify that tools are optional for LLM responses, enhancing user guidance.
- Refactored indicator type resolution in IndicatorTools to support fuzzy matching and provide suggestions for invalid types, improving user experience and error handling.
- Updated methods to utilize the new resolution logic, ensuring consistent handling of indicator types across the application.
2026-01-04 02:00:51 +07:00
8ce7650bbf Remove McpService and refactor dependency injection for MCP tools
- Deleted the McpService class, which was previously responsible for executing Model Context Protocol (MCP) tools.
- Updated the ApiBootstrap class to change the registration of IMcpService to the new Managing.Mcp.McpService implementation.
- Added new MCP tool implementations for DataTools, BotTools, and IndicatorTools to enhance functionality.
2026-01-03 22:55:27 +07:00
6f55566db3 Implement LLM provider configuration and update user settings
- Added functionality to update the default LLM provider for users via a new endpoint in UserController.
- Introduced LlmProvider enum to manage available LLM options: Auto, Gemini, OpenAI, and Claude.
- Updated User and UserEntity models to include DefaultLlmProvider property.
- Enhanced database context and migrations to support the new LLM provider configuration.
- Integrated LLM services into the application bootstrap for dependency injection.
- Updated TypeScript API client to include methods for managing LLM providers and chat requests.
2026-01-03 21:55:55 +07:00
fb49190346 Add agent summary update functionality and improve user controller
- Introduced a new endpoint in UserController to update the agent summary, ensuring balance data is refreshed after transactions.
- Implemented ForceUpdateSummaryImmediate method in IAgentGrain to allow immediate updates without cooldown checks.
- Enhanced StartBotCommandHandler to force update the agent summary before starting the bot, ensuring accurate balance data.
- Updated TypeScript API client to include the new update-agent-summary method for frontend integration.
2026-01-03 03:09:44 +07:00
78c2788ba7 Implement synthetic token validation and enhance swap logic in GMX plugin
- Added early validation to prevent swapping synthetic tokens, ensuring users are informed about the limitations of synthetic tokens.
- Enhanced the swap logic to handle synthetic tokens by falling back to a direct swap order transaction when synthetic tokens are involved or when the SDK swap fails.
- Improved the calculation of minimum output amounts based on swap path statistics or fallback to price-based calculations for better accuracy.
2026-01-02 23:45:32 +07:00
16421a1c9c Enhance token data retrieval and improve bot list filtering
- Updated `getTokenDataFromTicker` to support both synthetic and non-synthetic tokens by attempting to fetch v2 tokens first, falling back to a version-less search if necessary.
- Added minimum and maximum balance filters to the bot list, allowing users to specify balance constraints for better bot management.
- Refactored sorting direction to use a dedicated `SortDirection` enum for improved type safety.
2026-01-02 01:20:53 +07:00
9b83527acc Remove console.log for user 2026-01-01 22:31:09 +07:00
7091db99f0 Remove obsolete Aspire.Hosting.AppHost package reference from Managing.Workers project file 2026-01-01 22:30:36 +07:00
5518e798f7 Remove obsolete Aspire.Hosting.AppHost package reference from Managing.Api project file 2026-01-01 22:23:48 +07:00
ef47fac7fc Fix web3proxy 2026-01-01 22:13:23 +07:00
614aff169c Revert dockerfile 2026-01-01 21:56:55 +07:00
eb7d206566 Refactor Dockerfile for managing API development
- Simplified Dockerfile by removing redundant build step and adjusting COPY command for clarity.
- Updated publish command to include --no-restore for efficiency during the build process.
2026-01-01 21:54:18 +07:00
8c8dec3494 Update Dockerfile and TypeScript interfaces for improved project structure and functionality
- Adjusted Dockerfile to correct project paths for COPY commands, ensuring proper build context.
- Enhanced TypeScript interfaces by adding 'gmxSlippage' to User and 'botTradingBalance' to TradingBotResponse, improving data handling.
- Updated methods in BotClient and DataClient to include optional min and max balance parameters for better filtering capabilities.
2026-01-01 21:48:36 +07:00
18373b657a Add min and max balance filters to bot management
- Introduced optional parameters for minimum and maximum BotTradingBalance in BotController, DataController, and related services.
- Updated interfaces and repository methods to support filtering by BotTradingBalance.
- Enhanced TradingBotResponse and BotEntity models to include BotTradingBalance property.
- Adjusted database schema to accommodate new BotTradingBalance field.
- Ensured proper mapping and handling of BotTradingBalance in PostgreSQL repository and mappers.
2026-01-01 21:32:05 +07:00
59a9c56330 Fix script to run aspire 2025-12-31 22:08:55 +07:00
55f09c3091 Fix build 2025-12-31 18:01:29 +07:00
cef86a5025 Enhance start-api-and-workers.sh and vibe-dev-server.sh scripts
- Added support for Swagger in the API by setting EnableSwagger environment variable.
- Implemented build error handling for both API and Workers, providing detailed feedback and suggestions for resolution.
- Updated vibe-dev-server.sh to start the API and Workers using Aspire, including improved logging and dashboard URL extraction.
- Enhanced waiting mechanisms for API readiness and Aspire dashboard availability, ensuring smoother startup experience.
2025-12-31 05:23:07 +07:00
ab08e0241b Update Vibe Kanban setup and scripts
- Added new entries to .gitignore for environment files and dynamically generated Docker Compose files.
- Updated documentation to reflect the new path for the Vibe Kanban dev server script.
- Enhanced task composition scripts to extract TASK_SLOT from TASK_ID, ensuring unique Orleans ports and preventing conflicts.
- Removed the old vibe-dev-server script, consolidating functionality into the new structure.
2025-12-31 04:36:20 +07:00
2e0baa45c0 Enhance vibe-dev-server script to include log file monitoring and improved output for API and Workers logs. Implement waiting mechanism for log file creation, and utilize multitail for better log viewing experience. Add cleanup functionality for background processes when exiting. 2025-12-31 01:43:41 +07:00
a37b59f29a Add vibe-kanban 2025-12-31 01:31:54 +07:00
488d7c2a76 Add vibe-kanban scripts 2025-12-31 01:31:42 +07:00
d102459b27 Update slippage handling in GMX position management to ensure valid ranges and improve logging. Refactor slippage calculations in openGmxPositionImpl and swapGmxTokensImpl, introducing clamping for slippage percentages and detailed output for swap calculations. Adjust tests to reflect changes in expected parameters for position opening. 2025-12-30 20:14:11 +07:00
21d87efeee Refactor user settings management to remove IsGmxEnabled and DefaultExchange from updatable fields, introducing GmxSlippage instead. Update UserController, UserService, and related DTOs to reflect these changes, ensuring proper handling of user settings. Adjust database schema and migrations to accommodate the new GmxSlippage property, enhancing user customization options for trading configurations. 2025-12-30 07:19:08 +07:00
aa3b06bbe4 Enhance user settings management by adding new properties and updating related functionality
This commit introduces additional user settings properties, including TrendStrongAgreementThreshold, SignalAgreementThreshold, AllowSignalTrendOverride, and DefaultExchange, to the User entity and associated DTOs. The UserController and UserService are updated to handle these new settings, allowing users to customize their trading configurations more effectively. Database migrations are also included to ensure proper schema updates for the new fields.
2025-12-30 06:48:08 +07:00
79d8a381d9 Add user settings update functionality in UserController and UserService
Implement a new endpoint in UserController to allow users to update their settings. The UserService is updated to handle the logic for updating user settings, including partial updates for various fields. Additionally, the User entity and database schema are modified to accommodate new user settings properties, ensuring persistence and retrieval of user preferences.
2025-12-30 05:54:15 +07:00
95e60108af Enhance Privy integration by adding getWalletIdFromAddress function to retrieve wallet IDs directly from addresses. Update callContract and related methods to utilize the new function for improved transaction handling. Modify tests to reflect changes in wallet address handling and ensure accurate position management. 2025-12-30 03:02:23 +07:00
274effc749 Update dependencies and refactor Privy integration in Web3Proxy. Replace @privy-io/server-auth with @privy-io/node, introducing authorization context handling for improved transaction security. Modify transaction methods to align with the new SDK structure, ensuring compatibility and enhanced logging for wallet operations. 2025-12-30 00:37:12 +07:00
263c1b0592 Refactor swapGmxTokensImpl to improve wallet balance verification and precision handling. Introduce tolerance checks for requested amounts against wallet balances to prevent errors during swaps. Update logging to provide detailed information on final amounts used in transactions, ensuring better user feedback and error handling. 2025-12-29 20:40:47 +07:00
bdf62f6c9e Implement balance checks for transactions and swaps in GMX SDK. Enhance error handling to provide detailed feedback on insufficient funds, ensuring users are informed of their wallet status before executing transactions. This includes verifying wallet balances before and after operations to prevent unexpected failures. 2025-12-29 20:34:42 +07:00
10691ab0b8 Add endpoint for retrieving spot position history in GMX API. Enhance SpotBot to handle 404 errors gracefully when positions are not found in broker history, improving logging and user feedback for closed positions. 2025-12-29 16:58:32 +07:00
ee8db1cdc8 Enhance SpotBot to improve position recovery logic and add token balance verification after closing positions. The changes include filtering for recent unfinished positions and logging detailed information during position closure, ensuring better tracking and error handling for token balances. 2025-12-29 16:39:02 +07:00
493a2be368 Enhance BacktestComputeWorker to include duration in completion messages for successful and failed backtests. This change improves user feedback by providing detailed timing information alongside the results of the backtests. 2025-12-28 22:20:20 +07:00
e0fb76872e Refactor StartBotCommandHandler to conditionally check trading_future feature flag based on trading type. This change ensures that the feature flag validation is only performed for Futures and BacktestFutures trading types, improving the handling of bot configuration. 2025-12-28 22:18:01 +07:00
31886aeaf3 Refactor signal generation in TradingService to implement a rolling window approach, allowing for incremental processing of candles. This change enhances signal capture across the entire date range and prevents duplicate signals by tracking seen identifiers. 2025-12-28 21:22:45 +07:00
8a7addafd7 Refactor signal generation in TradingService to process indicators individually, improving clarity and performance. Add new API types for refining indicators, including request and response structures. 2025-12-28 20:59:11 +07:00
4f3ec31501 Add endpoint for indicator refiner 2025-12-28 20:38:38 +07:00
d1924d9030 Enhance BacktestExecutor and BacktestComputeWorker with timeout and memory monitoring features. Implement auto-completion for stuck jobs and handle long-running jobs more effectively. Add overall runtime checks for bundles in BundleBacktestHealthCheckWorker to improve job management and recovery processes. 2025-12-28 18:56:33 +07:00
f84524f93a Update benchmark 2025-12-28 18:28:51 +07:00