Struct SnapshotLastTrade
- Namespace
- MassiveDotNet.Rest.Models
- Assembly
- MassiveDotNet.Rest.dll
The most recent trade inside a snapshot: price, size, exchange, conditions, and the SIP timestamp.
[JsonConverter(typeof(SnapshotLastTradeJsonConverter))]
public readonly record struct SnapshotLastTrade : IEquatable<SnapshotLastTrade>
- Implements
- Inherited Members
Remarks
A tick-level type, so a struct (decision D4). SipTimestamp is computed from SipTimestampNanoseconds only when read (decision D5).
Properties
Conditions
The condition codes of the trade. The description marks it required; the service omits it when the trade carried no conditions.
[JsonPropertyName("c")]
[JsonConverter(typeof(PooledArrayConverter<int>))]
public int[]? Conditions { get; init; }
Property Value
- int[]
DecimalSize
The size of the trade including its fractional component. 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). The description marks it required; the service omits it on some
tickers in the whole-market snapshot.
[JsonPropertyName("ds")]
public decimal? DecimalSize { get; init; }
Property Value
ExchangeId
The exchange ID. See Exchanges for Massive's mapping of exchange IDs.
[JsonPropertyName("x")]
public int ExchangeId { get; init; }
Property Value
Price
The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.
[JsonPropertyName("p")]
public double Price { get; init; }
Property Value
SipTimestamp
The moment the SIP received this trade, converted from SipTimestampNanoseconds.
[JsonIgnore]
public Instant SipTimestamp { get; }
Property Value
Remarks
The conversion happens only when read (decision D5).
SipTimestampNanoseconds
The nanosecond Unix timestamp at which the SIP received this trade. The description declares a bare integer; every value overflows int32.
[JsonPropertyName("t")]
public long SipTimestampNanoseconds { get; init; }
Property Value
Size
The size (volume) of the trade.
[JsonPropertyName("s")]
public int Size { get; init; }
Property Value
TradeId
The Trade ID which uniquely identifies a trade. These are unique per combination of ticker, exchange, and TRF. For example: A trade for AAPL executed on NYSE and a trade for AAPL executed on NASDAQ could potentially have the same Trade ID.
[JsonPropertyName("i")]
public required string TradeId { get; init; }