Class StockPrice
- Namespace
- Tudormobile.FinancialData.Entities
- Assembly
- Tudormobile.FinancialData.dll
Represents daily stock price information for a specific trading symbol, including open, high, low, close prices, and trading volume.
public record StockPrice : IEquatable<StockPrice>
- Inheritance
-
StockPrice
- Implements
- Inherited Members
Remarks
This record is intended for use in financial data processing scenarios, such as historical price analysis, charting, or serialization. All properties are required to accurately describe a single day's trading activity for the specified symbol.
Constructors
StockPrice()
public StockPrice()
StockPrice(StockPrice)
protected StockPrice(StockPrice original)
Parameters
originalStockPrice
Properties
Close
Gets the closing price of the asset for the trading period.
public decimal Close { get; init; }
Property Value
Date
Gets the date associated with the record.
public DateOnly Date { get; set; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
High
Gets the highest price recorded during the relevant time period.
public decimal High { get; init; }
Property Value
Low
Gets the lowest price recorded during the relevant time period.
public decimal Low { get; init; }
Property Value
Open
Gets the opening price of the asset for the trading period.
public decimal Open { get; init; }
Property Value
Time
Gets the timestamp representing the date and time associated with the current instance.
public DateTimeOffset Time { get; set; }
Property Value
Remarks
This property is initialized at the time of object creation and cannot be modified thereafter. It is represented as a DateTimeOffset, which includes both the date and time along with the offset from UTC.
TradingSymbol
Gets the trading symbol associated with the financial instrument.
public string? TradingSymbol { get; init; }
Property Value
Volume
Gets the total traded volume for the security.
public decimal Volume { get; init; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(StockPrice?)
public virtual bool Equals(StockPrice? other)
Parameters
otherStockPrice
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
Returns a string representation of the current instance serialized using the FinancialDataSerializer.
public override string ToString()
Returns
- string
A string that contains the serialized form of the current object.
Remarks
Use this method to obtain a text-based representation suitable for storage or transmission. The format of the returned string is determined by FinancialDataSerializer and may be subject to change in future versions.
Operators
operator ==(StockPrice?, StockPrice?)
public static bool operator ==(StockPrice? left, StockPrice? right)
Parameters
leftStockPricerightStockPrice
Returns
operator !=(StockPrice?, StockPrice?)
public static bool operator !=(StockPrice? left, StockPrice? right)
Parameters
leftStockPricerightStockPrice