Clean and update event
This commit is contained in:
@@ -19,31 +19,6 @@ public interface IPlatformSummaryGrain : IGrainWithStringKey
|
||||
/// </summary>
|
||||
Task RefreshDataAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total volume traded across all strategies
|
||||
/// </summary>
|
||||
Task<decimal> GetTotalVolumeAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total PnL across all strategies
|
||||
/// </summary>
|
||||
Task<decimal> GetTotalPnLAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total open interest across all positions
|
||||
/// </summary>
|
||||
Task<decimal> GetTotalOpenInterest();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total number of open positions
|
||||
/// </summary>
|
||||
Task<int> GetTotalPositionCountAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total platform fees
|
||||
/// </summary>
|
||||
Task<decimal> GetTotalFeesAsync();
|
||||
|
||||
// Event handlers for immediate updates
|
||||
/// <summary>
|
||||
/// Updates the active strategy count
|
||||
@@ -96,4 +71,10 @@ public class PositionOpenEvent : PlatformMetricsEvent
|
||||
|
||||
[Id(4)] public TradeDirection Direction { get; set; }
|
||||
[Id(5)] public Guid PositionIdentifier { get; set; }
|
||||
}
|
||||
|
||||
[GenerateSerializer]
|
||||
public class PositionUpdatedEvent : PlatformMetricsEvent
|
||||
{
|
||||
[Id(1)] public Guid PositionIdentifier { get; set; }
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public class AgentSummaryUpdateEvent
|
||||
{
|
||||
[Id(0)] public Guid BotId { get; set; }
|
||||
|
||||
[Id(1)] public AgentSummaryEventType EventType { get; set; }
|
||||
[Id(1)] public NotificationEventType EventType { get; set; }
|
||||
|
||||
[Id(2)] public DateTime Timestamp { get; set; } = DateTime.UtcNow;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ public interface ITradingService
|
||||
Task<Scenario> GetScenarioByNameAsync(string scenario);
|
||||
Task InsertPositionAsync(Position position);
|
||||
Task UpdatePositionAsync(Position position);
|
||||
Task UpdateTradeAsync(Trade trade);
|
||||
Task<IndicatorBase> GetIndicatorByNameAsync(string strategy);
|
||||
Task InsertScenarioAsync(Scenario scenario);
|
||||
Task InsertIndicatorAsync(IndicatorBase indicatorBase);
|
||||
|
||||
Reference in New Issue
Block a user