Add net Pnl in db
This commit is contained in:
@@ -22,27 +22,29 @@ public class PlatformSummaryGrainState
|
||||
|
||||
[Id(5)] public decimal TotalPlatformPnL { get; set; }
|
||||
|
||||
[Id(6)] public decimal TotalPlatformVolume { get; set; }
|
||||
[Id(6)] public decimal NetPnL { get; set; }
|
||||
|
||||
[Id(7)] public decimal OpenInterest { get; set; }
|
||||
[Id(7)] public decimal TotalPlatformVolume { get; set; }
|
||||
|
||||
[Id(8)] public int TotalLifetimePositionCount { get; set; }
|
||||
[Id(8)] public decimal OpenInterest { get; set; }
|
||||
|
||||
[Id(9)] public decimal TotalPlatformFees { get; set; }
|
||||
[Id(9)] public int TotalLifetimePositionCount { get; set; }
|
||||
|
||||
[Id(10)] public decimal TotalPlatformFees { get; set; }
|
||||
|
||||
// Historical snapshots
|
||||
[Id(10)] public List<DailySnapshot> DailySnapshots { get; set; } = new();
|
||||
[Id(11)] public List<DailySnapshot> DailySnapshots { get; set; } = new();
|
||||
|
||||
// Volume breakdown by asset
|
||||
[Id(11)] public Dictionary<Ticker, decimal> VolumeByAsset { get; set; } = new();
|
||||
[Id(12)] public Dictionary<Ticker, decimal> VolumeByAsset { get; set; } = new();
|
||||
|
||||
// Position count breakdown
|
||||
[Id(12)] public Dictionary<Ticker, int> PositionCountByAsset { get; set; } = new();
|
||||
[Id(13)] public Dictionary<Ticker, int> PositionCountByAsset { get; set; } = new();
|
||||
|
||||
[Id(13)] public Dictionary<TradeDirection, int> PositionCountByDirection { get; set; } = new();
|
||||
[Id(14)] public Dictionary<TradeDirection, int> PositionCountByDirection { get; set; } = new();
|
||||
|
||||
// Flag to track if volume has been updated by events (not from bot strategies)
|
||||
[Id(14)] public bool VolumeUpdatedByEvents { get; set; }
|
||||
[Id(15)] public bool VolumeUpdatedByEvents { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -61,9 +63,11 @@ public class DailySnapshot
|
||||
|
||||
[Id(4)] public decimal TotalPnL { get; set; }
|
||||
|
||||
[Id(5)] public decimal TotalOpenInterest { get; set; }
|
||||
[Id(5)] public decimal NetPnL { get; set; }
|
||||
|
||||
[Id(6)] public int TotalLifetimePositionCount { get; set; }
|
||||
[Id(6)] public decimal TotalOpenInterest { get; set; }
|
||||
|
||||
[Id(7)] public int TotalPlatformFees { get; set; }
|
||||
[Id(7)] public int TotalLifetimePositionCount { get; set; }
|
||||
|
||||
[Id(8)] public int TotalPlatformFees { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user