Balance for bot (#20)

* Add bot balance

* Update amount to trade

* fix initial trading balance

* Update MM modal

* fix backtest

* stop bot if no more balance

* Add constant for minimum trading

* Add constant
This commit is contained in:
Oda
2025-04-28 16:52:42 +02:00
committed by GitHub
parent 967e8410dc
commit 204bd87e6a
39 changed files with 600 additions and 546 deletions

View File

@@ -5,21 +5,20 @@ namespace Managing.Api.Models.Requests
{
public class StartBotRequest
{
[Required] public BotType BotType { get; set; }
[Required] public string BotName { get; set; }
[Required] public Ticker Ticker { get; set; }
[Required] public Timeframe Timeframe { get; set; }
[Required] public bool IsForWatchOnly { get; set; }
[Required] public string Scenario { get; set; }
[Required] public string AccountName { get; set; }
[Required] public string MoneyManagementName { get; set; }
/// <summary>
/// Initial trading balance in USD for the bot
/// </summary>
[Required]
public BotType BotType { get; set; }
[Required]
public string BotName { get; set; }
[Required]
public Ticker Ticker { get; set; }
[Required]
public Timeframe Timeframe { get; set; }
[Required]
public bool IsForWatchOnly { get; set; }
[Required]
public string Scenario { get; set; }
[Required]
public string AccountName { get; set; }
[Required]
public string MoneyManagementName { get; set; }
[Range(10.00, double.MaxValue, ErrorMessage = "Initial trading balance must be greater than ten")]
public decimal InitialTradingBalance { get; set; }
}
}
}