Commit Graph

33 Commits

Author SHA1 Message Date
a254db6d24 Update bot market type 2025-12-11 23:32:06 +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
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
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
02e46e8d0d Add paginated user retrieval functionality in AdminController and related services. Implemented UsersFilter for filtering user queries and added LastConnectionDate property to User model. Updated database schema and frontend API to support new user management features. 2025-11-17 20:04:17 +07:00
06ef33b7ab Enhance user authentication by adding optional OwnerWalletAddress parameter in LoginRequest and UserService. Update UserController and related components to support the new wallet address functionality, ensuring better user profile management and validation in trading operations. 2025-11-17 13:48:05 +07:00
747bda2700 Update jobs 2025-11-09 04:48:15 +07:00
7e08e63dd1 Add genetic backtest to worker 2025-11-09 03:32:08 +07:00
7dba29c66f Add jobs 2025-11-09 02:08:31 +07:00
e0795677e4 Add whitelisting and admin 2025-11-07 23:46:48 +07:00
21110cd771 Add whitelisting service + update the jwt valid audience 2025-11-07 19:38:33 +07:00
92c28367cf Add Versionning for bundle backtest request 2025-10-23 13:37:53 +07:00
472c507801 Add netpnl and initialBalance to backtests 2025-10-16 17:19:22 +07:00
74adad5834 Add filters and sorting for backtests 2025-10-14 18:06:36 +07:00
5acc77650f Add bundle backtest refact + fix whitelist 2025-10-12 14:40:20 +07:00
b6b11be33a Fix perf with cache 2025-10-10 03:42:57 +07:00
ba3b0f6232 Add cache for user agent/name 2025-10-10 03:03:41 +07:00
f67ee330b3 Fix Runtime by adding TotalRuntimeInSeconds 2025-10-05 20:51:46 +07:00
58b07a1a13 Add netPnl in db for position 2025-10-03 03:11:17 +07:00
7da0143e91 Add migrations for agent table 2025-10-03 02:01:45 +07:00
06850b57c4 Add BacktestCount 2025-10-01 13:01:03 +07:00
f041c1e8e8 Add net Pnl in db 2025-09-28 22:18:58 +07:00
16a56bd26c Add agent fees 2025-09-28 20:57:42 +07:00
bcfeb693ce Update account/position and platform summary 2025-09-26 01:18:59 +07:00
63bc7bbe59 Bundle from worker to grain 2025-09-15 12:56:59 +07:00
Oda
56b4f14eb3 Price reminder and init approval
* Start price reminder grain

* Add config and init grain at startup

* Save init wallet when already init
2025-09-13 02:29:14 +07:00
289fd25dc3 Add agent balance fetch from proxy 2025-08-15 20:52:37 +07:00
b4a4656b3b Update the position count and initiator 2025-08-15 08:47:48 +07:00
36529ae403 Fix db and fix endpoints 2025-08-05 22:30:18 +07:00
2f1abb3f05 Add new migration 2025-08-05 04:34:54 +07:00
434f61f2de Clean migration 2025-08-05 04:13:02 +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
Oda
422fecea7b Postgres (#30)
* Add postgres

* Migrate users

* Migrate geneticRequest

* Try to fix Concurrent call

* Fix asyncawait

* Fix async and concurrent

* Migrate backtests

* Add cache for user by address

* Fix backtest migration

* Fix not open connection

* Fix backtest command error

* Fix concurrent

* Fix all concurrency

* Migrate TradingRepo

* Fix scenarios

* Migrate statistic repo

* Save botbackup

* Add settings et moneymanagement

* Add bot postgres

* fix a bit more backups

* Fix bot model

* Fix loading backup

* Remove cache market for read positions

* Add workers to postgre

* Fix workers api

* Reduce get Accounts for workers

* Migrate synth to postgre

* Fix backtest saved

* Remove mongodb

* botservice decorrelation

* Fix tradingbot scope call

* fix tradingbot

* fix concurrent

* Fix scope for genetics

* Fix account over requesting

* Fix bundle backtest worker

* fix a lot of things

* fix tab backtest

* Remove optimized moneymanagement

* Add light signal to not use User and too much property

* Make money management lighter

* insert indicators to awaitable

* Migrate add strategies to await

* Refactor scenario and indicator retrieval to use asynchronous methods throughout the application

* add more async await

* Add services

* Fix and clean

* Fix bot a bit

* Fix bot and add message for cooldown

* Remove fees

* Add script to deploy db

* Update dfeeploy script

* fix script

* Add idempotent script and backup

* finish script migration

* Fix did user and agent name on start bot
2025-07-27 20:42:17 +07:00