Struct StockTrade
- Namespace
- MassiveDotNet.WebSocket.Events
- Assembly
- MassiveDotNet.WebSocket.dll
One streamed stock trade: the T topic.
public readonly record struct StockTrade : IEquatable<StockTrade>
- Implements
- Inherited Members
Remarks
A tick-level type, so a struct (D4). Timestamps are stored as raw Unix millisecond values and exposed as Instant only when read (D5). The unit differs from REST v3, which sends nanoseconds for the same conceptual field (D-W11).
Properties
Conditions
The trade conditions.
public ConditionSet Conditions { get; init; }
Property Value
DecimalSize
The trade size including fractional shares. The wire sends this as a decimal string; it is carried as a decimal, which holds the value exactly and keeps the scale the service wrote (decision D38). Prefer it over Size, which truncates: a trade of less than one share reports a size of zero.
public decimal? DecimalSize { get; init; }
Property Value
ExchangeId
The exchange ID.
public int ExchangeId { get; init; }
Property Value
ParticipantTimestamp
When the trade occurred at the exchange or TRF.
public Instant? ParticipantTimestamp { get; }
Property Value
ParticipantTimestampMilliseconds
The raw participant timestamp, in Unix milliseconds, never after the SIP timestamp.
public long? ParticipantTimestampMilliseconds { get; init; }
Property Value
- long?
Price
The price per share.
public double Price { get; init; }
Property Value
SequenceNumber
The sequence number, increasing and unique per ticker but not contiguous.
public long SequenceNumber { get; init; }
Property Value
SipTimestamp
When the SIP received the trade.
public Instant SipTimestamp { get; }
Property Value
SipTimestampMilliseconds
The raw SIP timestamp, in Unix milliseconds.
public long SipTimestampMilliseconds { get; init; }
Property Value
Size
The trade size.
public long Size { get; init; }
Property Value
Tape
The tape: 1 = NYSE, 2 = AMEX, 3 = Nasdaq.
public int? Tape { get; init; }
Property Value
- int?
Ticker
The ticker symbol, interned across events.
public required string Ticker { get; init; }
Property Value
TradeId
The trade ID, unique per ticker, exchange, and TRF combination.
public required string TradeId { get; init; }
Property Value
TrfId
The Trade Reporting Facility ID, when the trade was reported through one.
public int? TrfId { get; init; }
Property Value
- int?
TrfTimestamp
When the Trade Reporting Facility received the trade.
public Instant? TrfTimestamp { get; }
Property Value
TrfTimestampMilliseconds
The raw TRF timestamp, in Unix milliseconds.
public long? TrfTimestampMilliseconds { get; init; }
Property Value
- long?