Fixes for bots running (#22)
* Fixes for bots running * Up botmanager * Add cooldown * Refact can open position * Add cooldown Period and MaxLossStreak * Add agentName * Add env variable for botManager * Always enable Botmanager * Fix bot handle * Fix get positions * Add Ticker url * Dont start stopped bot * fix
This commit is contained in:
@@ -20,5 +20,12 @@ namespace Managing.Api.Models.Requests
|
||||
[Required]
|
||||
[Range(10.00, double.MaxValue, ErrorMessage = "Initial trading balance must be greater than ten")]
|
||||
public decimal InitialTradingBalance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cooldown period in minutes between trades
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Range(1, 1440, ErrorMessage = "Cooldown period must be between 1 and 1440 minutes (24 hours)")]
|
||||
public decimal CooldownPeriod { get; set; } = 1; // Default to 1 minute if not specified
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ namespace Managing.Api.Models.Responses
|
||||
public class AgentSummaryViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Username of the agent
|
||||
/// AgentName of the agent
|
||||
/// </summary>
|
||||
public string Username { get; set; }
|
||||
public string AgentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Total profit and loss in USD
|
||||
|
||||
9
src/Managing.Api/Models/Responses/TickerInfos.cs
Normal file
9
src/Managing.Api/Models/Responses/TickerInfos.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Managing.Common;
|
||||
|
||||
namespace Managing.Api.Models.Responses;
|
||||
|
||||
public class TickerInfos
|
||||
{
|
||||
public Enums.Ticker Ticker { get; set; }
|
||||
public string ImageUrl { get; set; }
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using Managing.Domain.Candles;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Managing.Domain.Candles;
|
||||
using Managing.Domain.MoneyManagements;
|
||||
using Managing.Domain.Strategies;
|
||||
using Managing.Domain.Trades;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Api.Models.Responses
|
||||
@@ -23,5 +23,7 @@ namespace Managing.Api.Models.Responses
|
||||
[Required] public BotType BotType { get; internal set; }
|
||||
[Required] public string AccountName { get; internal set; }
|
||||
[Required] public MoneyManagement MoneyManagement { get; internal set; }
|
||||
[Required] public string Identifier { get; set; }
|
||||
[Required] public string AgentName { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user