- Removed the private _currentBalance field and replaced it with direct access to Config.BotTradingBalance.
- Added OnBalanceUpdatedCallback to TradingBotBase for immediate synchronization and database saving when the balance is updated.
- Updated LiveTradingBotGrain to set the callback for balance updates, ensuring accurate state management.
- Modified PostgreSqlBotRepository to save the updated bot trading balance during entity updates.
- 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.
- 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.
- Implemented GetBotByUserIdAndNameAsync in IBotService and BotService to retrieve a bot by user ID and name.
- Updated GetUserStrategyCommandHandler to utilize the new method for fetching strategies based on user ID.
- Added corresponding method in IBotRepository and PostgreSqlBotRepository for database access.
- 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.
* 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
* 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