Fix genetic backend
This commit is contained in:
@@ -103,6 +103,25 @@ public class BacktestController : BaseController
|
||||
return Ok(_backtester.DeleteBacktestByUser(user, id));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves all backtests for a specific genetic request ID.
|
||||
/// This endpoint is used to view the results of a genetic algorithm optimization.
|
||||
/// </summary>
|
||||
/// <param name="requestId">The request ID to filter backtests by.</param>
|
||||
/// <returns>A list of backtests associated with the specified request ID.</returns>
|
||||
[HttpGet]
|
||||
[Route("ByRequestId/{requestId}")]
|
||||
public async Task<ActionResult<IEnumerable<Backtest>>> GetBacktestsByRequestId(string requestId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(requestId))
|
||||
{
|
||||
return BadRequest("Request ID is required");
|
||||
}
|
||||
|
||||
var backtests = _backtester.GetBacktestsByRequestId(requestId);
|
||||
return Ok(backtests);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs a backtest with the specified configuration.
|
||||
/// The returned backtest includes a complete TradingBotConfig that preserves all
|
||||
|
||||
Reference in New Issue
Block a user