Update naming and remove used calls

This commit is contained in:
2025-09-28 15:59:11 +07:00
parent 0fa051ccb7
commit 2d403da28f
3 changed files with 4 additions and 5 deletions

View File

@@ -799,7 +799,7 @@ public class DataController : ControllerBase
TotalVolume = s.TotalVolume, TotalVolume = s.TotalVolume,
TotalPnL = s.TotalPnL, TotalPnL = s.TotalPnL,
TotalOpenInterest = s.TotalOpenInterest, TotalOpenInterest = s.TotalOpenInterest,
TotalPositionCount = s.TotalPositionCount TotalPositionCount = s.TotalLifetimePositionCount
}) })
.ToList(), .ToList(),

View File

@@ -63,7 +63,7 @@ public class DailySnapshot
[Id(5)] public decimal TotalOpenInterest { get; set; } [Id(5)] public decimal TotalOpenInterest { get; set; }
[Id(6)] public int TotalPositionCount { get; set; } [Id(6)] public int TotalLifetimePositionCount { get; set; }
[Id(7)] public int TotalPlatformFees { get; set; } [Id(7)] public int TotalPlatformFees { get; set; }
} }

View File

@@ -69,7 +69,7 @@ public class PlatformSummaryGrain : Grain, IPlatformSummaryGrain, IRemindable
TotalVolume = 0, TotalVolume = 0,
TotalPnL = 0, TotalPnL = 0,
TotalOpenInterest = 0, TotalOpenInterest = 0,
TotalPositionCount = 0, TotalLifetimePositionCount = 0,
TotalPlatformFees = 0, TotalPlatformFees = 0,
}; };
@@ -101,7 +101,6 @@ public class PlatformSummaryGrain : Grain, IPlatformSummaryGrain, IRemindable
_logger.LogInformation("Refreshing platform summary data"); _logger.LogInformation("Refreshing platform summary data");
var positions = await _tradingService.GetAllDatabasePositionsAsync(); var positions = await _tradingService.GetAllDatabasePositionsAsync();
var strategies = await _botService.GetBotsAsync();
// Calculate all metrics from positions in a single loop // Calculate all metrics from positions in a single loop
var totalVolume = 0m; var totalVolume = 0m;
@@ -301,7 +300,7 @@ public class PlatformSummaryGrain : Grain, IPlatformSummaryGrain, IRemindable
TotalVolume = _state.State.TotalPlatformVolume, TotalVolume = _state.State.TotalPlatformVolume,
TotalPnL = _state.State.TotalPlatformPnL, TotalPnL = _state.State.TotalPlatformPnL,
TotalOpenInterest = _state.State.OpenInterest, TotalOpenInterest = _state.State.OpenInterest,
TotalPositionCount = _state.State.TotalLifetimePositionCount, TotalLifetimePositionCount = _state.State.TotalLifetimePositionCount,
}; };
_state.State.DailySnapshots.Add(dailySnapshot); _state.State.DailySnapshots.Add(dailySnapshot);