Commit Graph

45 Commits

Author SHA1 Message Date
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
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
b60295fcb2 Add test for dailysnapshot 2025-11-14 19:42:52 +07:00
460a7bd559 Fix realized pnl on backtest save + add tests (not all passing) 2025-11-14 02:38:15 +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
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
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
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
3e680ab815 Do not stop strategy if position open 2025-10-01 12:31:53 +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
9bdfb989c1 Fix ROI 2025-09-24 01:19:10 +07:00
6aad2834a9 Add single time swap + fetch balance cache in AgentGrain 2025-09-21 23:41:27 +07:00
c2f3734021 Add Role based grain placement 2025-09-18 20:17:28 +07:00
530dd83daa Update Resume bot status 2025-09-18 13:23:26 +07:00
ffe69356d8 Fix reminding for livetradingbot 2025-09-18 12:19:52 +07:00
5216a0ae87 Removed reminder when stopped 2025-09-15 01:54:51 +07:00
2847778c7c Update pricing timing 2025-09-14 22:27:54 +07:00
28fef53ff8 Add automatic swap when low ETH 2025-08-28 06:49:14 +07:00
d2975be0f5 Merge workers into API 2025-08-16 04:55:33 +07:00
4a45d6c970 Add platform grain 2025-08-14 19:44:33 +07:00
6a2e4e81b1 Update status to match UI 2025-08-14 18:08:31 +07:00
9d0c7cf834 Fix bots restart/stop 2025-08-13 22:22:22 +07:00
46a6cdcd87 Fix manual position open 2025-08-07 14:47:36 +07:00
7d92031059 Clean namings and namespace 2025-08-05 17:45:44 +07:00
Oda
082ae8714b Trading bot grain (#33)
* Trading bot Grain

* Fix a bit more of the trading bot

* Advance on the tradingbot grain

* Fix build

* Fix db script

* Fix user login

* Fix a bit backtest

* Fix cooldown and backtest

* start fixing bot start

* Fix startup

* Setup local db

* Fix build and update candles and scenario

* Add bot registry

* Add reminder

* Updateing the grains

* fix bootstraping

* Save stats on tick

* Save bot data every tick

* Fix serialization

* fix save bot stats

* Fix get candles

* use dict instead of list for position

* Switch hashset to dict

* Fix a bit

* Fix bot launch and bot view

* add migrations

* Remove the tolist

* Add agent grain

* Save agent summary

* clean

* Add save bot

* Update get bots

* Add get bots

* Fix stop/restart

* fix Update config

* Update scanner table on new backtest saved

* Fix backtestRowDetails.tsx

* Fix agentIndex

* Update agentIndex

* Fix more things

* Update user cache

* Fix

* Fix account load/start/restart/run
2025-08-05 04:07:06 +07:00
84f3e91dc6 Try fixing orleans server runtime 2025-07-30 20:44:58 +07:00
Oda
3de8b5e00e Orlean (#32)
* Start building with orlean

* Add missing file

* Serialize grain state

* Remove grain and proxies

* update and add plan

* Update a bit

* Fix backtest grain

* Fix backtest grain

* Clean a bit
2025-07-30 16:03:30 +07:00