SoftTraderBackend/MarketDataRequest/LiveEquitySnapshot.cs
2026-03-20 10:42:48 -04:00

34 lines
791 B
C#

namespace Backend.MarketDataRequest
{
public sealed class LiveEquitySnapshot
{
public string Symbol { get; init; } = string.Empty;
public double? LastPrice { get; set; }
public long? Volume { get; set; }
public double? PreviousClose { get; set; }
public double? Open { get; set; }
public bool MarketOpen { get; set; } = true;
public bool IsComplete =>
LastPrice.HasValue &&
Volume.HasValue &&
PreviousClose.HasValue &&
Open.HasValue;
public bool HasMinimumData =>
LastPrice.HasValue &&
PreviousClose.HasValue;
public override string ToString()
{
return
$"Symbol={Symbol}, " +
$"LastPrice={LastPrice}, " +
$"Volume={Volume}, " +
$"PreviousClose={PreviousClose}, " +
$"Open={Open}, " +
$"MarketOpen={MarketOpen}";
}
}
}