Add copy trading authorization checks in LiveTradingBotGrain and StartCopyTradingCommandHandler. Integrated IKaigenService to verify user ownership of master strategy keys before allowing copy trading. Enhanced error handling and logging for authorization verification.
This commit is contained in:
@@ -19,4 +19,33 @@ public interface IKaigenService
|
||||
/// <param name="user">The user to refund</param>
|
||||
/// <returns>True if refund was successful</returns>
|
||||
Task<bool> RefundUserCreditsAsync(string requestId, User user);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the owned keys for a user
|
||||
/// </summary>
|
||||
/// <param name="user">The user to get owned keys for</param>
|
||||
/// <returns>The owned keys response containing items and overall total</returns>
|
||||
Task<OwnedKeysResponse> GetOwnedKeysAsync(User user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Response DTO for owned keys API
|
||||
/// </summary>
|
||||
public class OwnedKeysResponse
|
||||
{
|
||||
public List<OwnedKeyItem> Items { get; set; }
|
||||
public decimal Overall { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Individual owned key item DTO
|
||||
/// </summary>
|
||||
public class OwnedKeyItem
|
||||
{
|
||||
public string AgentName { get; set; }
|
||||
public string WalletAddress { get; set; }
|
||||
public decimal Owned { get; set; }
|
||||
public string UnitPrice { get; set; }
|
||||
public decimal Change24h { get; set; }
|
||||
public decimal Total { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user