153e170ca4
Refactor LiveBotRegistryGrain and PlatformSummaryGrain to improve active bot tracking
...
- Introduced CalculateActiveBotsCount method in LiveBotRegistryGrain to streamline active bot count calculations.
- Updated logging to reflect active bot counts accurately during registration and unregistration.
- Added historical tracking of strategy activation/deactivation events in PlatformSummaryGrain, including a new StrategyEvent class and related logic to manage event history.
- Enhanced CalculateActiveStrategiesForDate method to compute active strategies based on historical events.
2025-11-21 19:38:32 +07:00
4d4e5b6d25
Update position value calculations in AgentGrain and BotService
...
- Changed the calculation of USDC value in AgentGrain to use net profit and loss instead of realized profit.
- Added similar position value calculations in BotService, including error handling for position retrieval failures.
2025-11-20 20:34:12 +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
97103fbfe8
Add master strategy validation in LiveTradingBotGrain
...
- Introduced a check to ensure the master strategy is retrieved successfully before proceeding with key validation.
- Added logging for cases where the master strategy is not found, improving traceability in the bot's operation.
2025-11-19 23:39:38 +07:00
096fb500e4
Add position count property map
2025-11-19 14:16:30 +07:00
c229212acd
Add copy trading authorization checks in LiveTradingBotGrain and StartCopyTradingCommandHandler. Integrated IKaigenService to verify user ownership of master strategy keys before allowing copy trading. Enhanced error handling and logging for authorization verification.
2025-11-16 22:11:54 +07:00
ec88b124e6
Refactor LiveTradingBotGrain to close all open positions before stopping the bot. Introduced CloseAllOpenPositionsAsync method to handle position closure and logging, ensuring a smoother stop process. Removed the previous check for open positions in the database.
2025-11-16 18:22:48 +07:00
1e15d5f23b
Add copy trading functionality with StartCopyTrading endpoint and related models. Implemented position copying from master bot and subscription to copy trading stream in LiveTradingBotGrain. Updated TradingBotConfig to support copy trading parameters.
2025-11-16 14:54:17 +07:00
6d661f459e
Remove candle from backtest return + fix message when good backtest
2025-11-14 20:49:02 +07:00
b60295fcb2
Add test for dailysnapshot
2025-11-14 19:42:52 +07:00
d341ee05c9
Add more tests + Log pnl for each backtest
2025-11-14 13:12:04 +07:00
460a7bd559
Fix realized pnl on backtest save + add tests (not all passing)
2025-11-14 02:38:15 +07:00
2dc34f07d8
Add yield for orleans + 1min to 2h timeout for grain message + more exception send to sentry
2025-11-07 12:40:24 +07:00
5afddb895e
Add async for saving backtests
2025-11-05 16:58:46 +07:00
79f07af899
Fix get Balance
2025-10-20 16:20:36 +07:00
472c507801
Add netpnl and initialBalance to backtests
2025-10-16 17:19:22 +07:00
49b0f7b696
Fix restart with no accountName
2025-10-12 16:28:53 +07:00
ff74296c26
Fix restart/start if not account with the first account of the user
2025-10-12 16:08:12 +07:00
117d45fb50
Do not stop bot if position open
2025-10-11 00:32:02 +07:00
d71d47f644
Add reason when stopping bot
2025-10-10 23:31:32 +07:00
54fc08d71a
Add logs and backtest requester
2025-10-10 02:15:44 +07:00
21314430ef
Reduce logs for backtests
2025-10-10 01:59:27 +07:00
ffb98fe359
Fix update agent save + revert market in redis
2025-10-08 21:32:48 +07:00
fa160e2d1b
Update messages
2025-10-08 20:30:57 +07:00
b2a4e1ca5d
Fix agent volume
2025-10-08 19:57:19 +07:00
1a99224d18
Fix ROI calculation for Strategy
2025-10-08 19:37:24 +07:00
76b087a6e4
Fix status and filtered positions for metrics
2025-10-08 18:37:38 +07:00
86dd6849ea
Fix status IsFinished/IsOpen/IsForMetrics + use redis for markets on gmx.tsx instead of inmemory cache
2025-10-08 12:13:04 +07:00
67065469a6
Fix config update + remove messages + Summary fix for not open position
2025-10-08 02:52:11 +07:00
ff7e4ed3d3
un-stopped bot return status "stopped" instead of the error
2025-10-07 16:10:14 +07:00
719ce96e11
Fix lastStartTime update
2025-10-07 02:00:39 +07:00
347c78afc7
Update messaging
2025-10-06 01:34:13 +07:00
dab4807334
Fix Runtime
2025-10-06 00:55:18 +07:00
f67ee330b3
Fix Runtime by adding TotalRuntimeInSeconds
2025-10-05 20:51:46 +07:00
b25f0be083
Remove extra message on the low usdc while position open
2025-10-05 02:49:33 +07:00
de0d042254
Use usdc balance instead usdc value for ensuring balance check
2025-10-05 01:36:25 +07:00
343b85dada
Fix fetch and restart bot
2025-10-04 18:31:50 +07:00
15eba0fc3c
Prevent bot from stopping if position is open
2025-10-04 17:43:43 +07:00
3635fb4c29
Use bot allocation on running strategies only
2025-10-04 13:54:14 +07:00
f72bfc4ab8
Update balance tracking
2025-10-03 16:43:20 +07:00
7c13ad5f06
Update Agent balance tracking
2025-10-03 15:30:39 +07:00
3e680ab815
Do not stop strategy if position open
2025-10-01 12:31:53 +07:00
014a3ed7e5
Fix agent count
2025-09-28 23:34:56 +07:00
f041c1e8e8
Add net Pnl in db
2025-09-28 22:18:58 +07:00
6267dad8fa
Fix roi with fees
2025-09-28 21:42:08 +07:00
16a56bd26c
Add agent fees
2025-09-28 20:57:42 +07:00
a8d09c36b7
Update agent stats
2025-09-28 13:55:24 +07:00
6e07bac6ae
Fix agent grain calculation
2025-09-28 11:47:47 +07:00
d432549d26
Clean and update event
2025-09-27 22:20:12 +07:00