Add MasterAgentName to UserStrategyDetailsViewModel and DataController
- Updated UserStrategyDetailsViewModel to include MasterAgentName property, which represents the agent name of the master bot's owner for copy trading bots. - Modified DataController to populate the MasterAgentName field when returning strategy details.
This commit is contained in:
@@ -509,7 +509,7 @@ public class BotController : BaseController
|
|||||||
Roi = item.Roi,
|
Roi = item.Roi,
|
||||||
Identifier = item.Identifier.ToString(),
|
Identifier = item.Identifier.ToString(),
|
||||||
AgentName = item.User.AgentName,
|
AgentName = item.User.AgentName,
|
||||||
MasterAgentName = item.MasterBotUser?.AgentName ?? item.User.AgentName,
|
MasterAgentName = item.MasterBotUser?.AgentName,
|
||||||
CreateDate = item.CreateDate,
|
CreateDate = item.CreateDate,
|
||||||
StartupTime = item.StartupTime,
|
StartupTime = item.StartupTime,
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
|
|||||||
@@ -609,7 +609,8 @@ public class DataController : ControllerBase
|
|||||||
Positions = positionViewModels,
|
Positions = positionViewModels,
|
||||||
Identifier = strategy.Identifier,
|
Identifier = strategy.Identifier,
|
||||||
WalletBalances = walletBalances,
|
WalletBalances = walletBalances,
|
||||||
Ticker = strategy.Ticker
|
Ticker = strategy.Ticker,
|
||||||
|
MasterAgentName = strategy.MasterBotUser?.AgentName
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,5 +91,10 @@ namespace Managing.Api.Models.Responses
|
|||||||
|
|
||||||
public Dictionary<DateTime, decimal> WalletBalances { get; set; } = new Dictionary<DateTime, decimal>();
|
public Dictionary<DateTime, decimal> WalletBalances { get; set; } = new Dictionary<DateTime, decimal>();
|
||||||
public Enums.Ticker Ticker { get; set; }
|
public Enums.Ticker Ticker { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The agent name of the master bot's owner (for copy trading bots)
|
||||||
|
/// </summary>
|
||||||
|
public string MasterAgentName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user