Commit Graph

351 Commits

Author SHA1 Message Date
13474b6abb Update LLM 2026-01-05 17:36:19 +07:00
fb3a628b19 Update llm prompt sys 2026-01-05 06:23:54 +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
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
5518e798f7 Remove obsolete Aspire.Hosting.AppHost package reference from Managing.Api project file 2026-01-01 22:23:48 +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
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
a37b59f29a Add vibe-kanban 2025-12-31 01:31:54 +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
4f3ec31501 Add endpoint for indicator refiner 2025-12-28 20:38:38 +07:00
bcb00b9a86 Refactor pagination sorting parameters across multiple controllers and services to use the new SortDirection enum; update related API models and TypeScript definitions for consistency. Fix minor documentation and naming inconsistencies in the Bot and Data controllers. 2025-12-14 20:23:26 +07:00
eff0c11f26 Refactor Sentry initialization in Program.cs to conditionally set DSN based on configuration; enhance DiscordService to create a service scope for command module registration. 2025-12-14 01:24:24 +07:00
e0e4dda808 Set config to env variables 2025-12-14 01:15:40 +07:00
2157d1f2c9 Remove references to Managing.Aspire.AppHost and Managing.Aspire.ServiceDefaults from solution and project files; update API project to eliminate unused references and adjust JWT token handling in Program.cs; enhance NSwag generation for Axios and Fetch clients, including new import handling. 2025-12-14 00:18:02 +07:00
c4e444347c Fix bot update with the tradingtype 2025-12-13 14:46:30 +07:00
e6cac0057b Uodate Env key for flagsmith prod 2025-12-12 02:49:07 +07:00
a254db6d24 Update bot market type 2025-12-11 23:32:06 +07:00
35df25915f Add flagsmith 2025-12-11 19:22:54 +07:00
1426f0b560 Clean code, remove warning for future and spot 2025-12-11 14:36:35 +07:00
78edd850fe Add isLiveTrading helper to fix bug 2025-12-04 23:42:09 +07:00
b44e1f66a7 Fix spot bot 2025-12-04 21:21:48 +07:00
3771bb5dde Refactor SwapGmxTokens functionality into TradingService
- Moved SwapGmxTokensAsync method from AccountService to TradingService to centralize trading operations.
- Updated AccountController and AgentGrain to utilize the new TradingService method for swapping GMX tokens.
- Removed the old SwapGmxTokensAsync method from IAccountService and its implementation in AccountService.
2025-12-01 22:49:30 +07:00
Oda
9d536ea49e Refactoring TradingBotBase.cs + clean architecture (#38)
* Refactoring TradingBotBase.cs + clean architecture

* Fix basic tests

* Fix tests

* Fix workers

* Fix open positions

* Fix closing position stucking the grain

* Fix comments

* Refactor candle handling to use IReadOnlyList for chronological order preservation across various components
2025-12-01 19:32:06 +07:00
4b5c1c5ce0 Fix graph 2025-11-25 11:03:52 +07:00
6376e13b07 Add Bollinger Bands Volatility Protection indicator support
- Introduced BollingerBandsVolatilityProtection indicator in GeneticService with configuration settings for period and standard deviation (stdev).
- Updated ScenarioHelpers to handle creation and validation of the new indicator type.
- Enhanced CustomScenario, backtest, and scenario pages to include BollingerBandsVolatilityProtection in indicator lists and parameter mappings.
- Modified API and types to reflect the addition of the new indicator in relevant enums and mappings.
- Updated frontend components to support new parameters and visualization for Bollinger Bands.
2025-11-25 02:12:57 +07:00
9e3d8c74b9 Remove some logs from db 2025-11-24 01:26:10 +07:00
fef66f6d7b Update configuration settings and logging behavior for SQL monitoring
- Increased thresholds for maximum query and method executions per window to 500 and 250, respectively, to reduce false positives in loop detection.
- Enabled logging of slow queries only, improving performance by reducing log volume.
- Adjusted SQL query logging to capture only warnings and errors, further optimizing logging efficiency.
- Updated various settings across appsettings files to reflect these changes, ensuring consistency in configuration.
2025-11-24 01:02:53 +07:00
372d19f840 Refactor welcome message handling to UserService for Telegram channel updates
- Moved the welcome message logic from UserController to UserService to centralize user notification handling.
- Improved error logging for message sending failures, ensuring better traceability of issues.
- Enhanced user experience by maintaining the detailed setup information and friendly greeting in the welcome message.
2025-11-24 00:43:58 +07:00
220ca66546 Update welcome message format in UserController for Kaigen Notifications
- Revised the welcome message sent to users upon Telegram channel configuration to enhance clarity and engagement.
- Included detailed setup information and a friendly greeting to improve user experience.
- Updated notification types to reflect the new features and services provided by the Kaigen notification system.
2025-11-24 00:37:07 +07:00
d10ce5e3ba Enhance error handling and logging in BotController, LiveTradingBotGrain, and BotService
- Added specific handling for ServiceUnavailableException in BotController to return user-friendly messages.
- Improved logging for Orleans exceptions in both BotController and BotService to provide clearer context during errors.
- Implemented verification of position closure status in LiveTradingBotGrain, including timeout handling for closing positions.
- Enhanced logging for critical and non-critical operations during bot stop processes to ensure better traceability.
2025-11-23 21:48:21 +07:00
411fc41bef Refactor BotController and BotService for improved bot management
- Cleaned up constructor parameters in BotController for better readability.
- Enhanced StartCopyTradingCommand handling with improved formatting.
- Updated bot deletion logic in BotService to delete associated positions and trigger agent summary updates.
- Added new method in TradingService for deleting positions by initiator identifier.
- Implemented error handling in StopBotCommandHandler to ensure agent summary updates do not disrupt bot stop operations.
2025-11-23 15:30:11 +07:00
2a354bd7d2 Implement profitable bots filtering in BotController and DataController
- Added IConfiguration dependency to BotController for accessing environment variables.
- Updated GetBotsPaginatedAsync method in BotService and IBotService to include a flag for filtering profitable bots.
- Modified DataController to utilize the new filtering option for agent summaries and bot retrieval.
- Enhanced PostgreSqlBotRepository to apply filtering based on profitability when querying bots.
2025-11-22 14:02:29 +07:00
e69dd43ace Enhance DataController and BotService with new configuration and bot name checks
- Added IConfiguration dependency to DataController for environment variable access.
- Updated GetPaginatedAgentSummariesCommand to include a flag for filtering profitable agents.
- Implemented HasUserBotWithNameAsync method in IBotService and BotService to check for existing bots by name.
- Modified StartBotCommandHandler and StartCopyTradingCommandHandler to prevent duplicate bot names during strategy creation.
2025-11-22 13:34:26 +07:00
53f81302ba Return last 24 volume for strategies 2025-11-21 17:02:18 +07:00
1bec83a2ec Add MasterAgentName to UserStrategyDetailsViewModel and DataController
- Updated UserStrategyDetailsViewModel to include MasterAgentName property, which represents the agent name of the master bot's owner for copy trading bots.
- Modified DataController to populate the MasterAgentName field when returning strategy details.
2025-11-21 14:28:19 +07:00
190a9cf12d Finish copy trading 2025-11-20 14:46:54 +07:00
ff2df2d9ac Add MasterBotUserId and MasterAgentName for copy trading support
- Introduced MasterBotUserId and MasterAgentName properties to facilitate copy trading functionality.
- Updated relevant models, controllers, and database entities to accommodate these new properties.
- Enhanced validation logic in StartCopyTradingCommandHandler to ensure proper ownership checks for master strategies.
2025-11-20 00:33:31 +07:00
096fb500e4 Add position count property map 2025-11-19 14:16:30 +07:00
9b25201def Remove SSL for kaigen API url 2025-11-19 09:08:58 +07:00
6db2b34f9f Update influxdb api key 2025-11-19 09:01:53 +07:00
3236edd2bb Add Kaigen API health check and configuration
- Introduced Kaigen configuration section in appsettings.Oda.json with BaseUrl.
- Added HTTP client for Kaigen API health check in Program.cs.
- Registered KaigenHealthCheck service for monitoring Kaigen API connectivity.
2025-11-19 00:59:49 +07:00
68e9b2348c Add PositionCount property to Backtest models and responses
- Introduced PositionCount to Backtest, LightBacktest, and their respective response models.
- Updated BacktestController and BacktestExecutor to include PositionCount in responses.
- Modified database schema to accommodate new PositionCount field in relevant entities.
2025-11-18 22:23:20 +07:00
0ee190786e Prevent user to open multiple strategy on the same ticker 2025-11-18 13:58:50 +07:00