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.
This commit is contained in:
2026-01-01 21:32:05 +07:00
parent 59a9c56330
commit 18373b657a
16 changed files with 1881 additions and 19 deletions

View File

@@ -908,6 +908,8 @@ public class DataController : ControllerBase
/// <param name="name">Filter by name (partial match, case-insensitive)</param>
/// <param name="ticker">Filter by ticker (partial match, case-insensitive)</param>
/// <param name="agentName">Filter by agent name (partial match, case-insensitive)</param>
/// <param name="minBalance">Filter by minimum BotTradingBalance (optional)</param>
/// <param name="maxBalance">Filter by maximum BotTradingBalance (optional)</param>
/// <param name="sortBy">Sort field (defaults to CreateDate)</param>
/// <param name="sortDirection">Sort direction - Asc or Desc (defaults to Desc)</param>
/// <returns>A paginated list of strategies excluding Saved status bots</returns>
@@ -918,6 +920,8 @@ public class DataController : ControllerBase
string? name = null,
string? ticker = null,
string? agentName = null,
decimal? minBalance = null,
decimal? maxBalance = null,
BotSortableColumn sortBy = BotSortableColumn.CreateDate,
SortDirection sortDirection = SortDirection.Desc)
{
@@ -946,6 +950,8 @@ public class DataController : ControllerBase
name,
ticker,
agentName,
minBalance,
maxBalance,
sortBy,
sortDirection,
showOnlyProfitable);
@@ -1031,6 +1037,7 @@ public class DataController : ControllerBase
Ticker = item.Ticker,
TradingType = item.TradingType,
MasterAgentName = item.MasterBotUser?.AgentName,
BotTradingBalance = item.BotTradingBalance,
});
}