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:
@@ -441,6 +441,8 @@ public class BotController : BaseController
|
||||
string? name = null,
|
||||
string? ticker = null,
|
||||
string? agentName = null,
|
||||
decimal? minBalance = null,
|
||||
decimal? maxBalance = null,
|
||||
BotSortableColumn sortBy = BotSortableColumn.CreateDate,
|
||||
SortDirection sortDirection = SortDirection.Desc)
|
||||
{
|
||||
@@ -468,6 +470,8 @@ public class BotController : BaseController
|
||||
name,
|
||||
ticker,
|
||||
agentName,
|
||||
minBalance,
|
||||
maxBalance,
|
||||
sortBy,
|
||||
sortDirection,
|
||||
showOnlyProfitable);
|
||||
@@ -545,6 +549,7 @@ public class BotController : BaseController
|
||||
Name = item.Name,
|
||||
Ticker = item.Ticker,
|
||||
TradingType = item.TradingType,
|
||||
BotTradingBalance = item.BotTradingBalance,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user