Struct Trade
- Namespace
- MassiveDotNet.Rest.Models
- Assembly
- MassiveDotNet.Rest.dll
One trade from the v3 trades feed: price, size, exchange, conditions, and three nanosecond timestamps.
[JsonConverter(typeof(TradeJsonConverter))]
public readonly record struct Trade : IEquatable<Trade>
- Implements
- Inherited Members
Remarks
A tick-level type, so a struct (decision D4). Timestamps are stored as nanosecond long values and exposed as Instant only when read (decision D5).
Properties
Conditions
A list of condition codes.
[JsonPropertyName("conditions")]
[JsonConverter(typeof(PooledArrayConverter<int>))]
public int[]? Conditions { get; init; }
Property Value
- int[]
CorrectionIndicator
The trade correction indicator.
[JsonPropertyName("correction")]
public int? CorrectionIndicator { 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).
[JsonPropertyName("decimal_size")]
public decimal DecimalSize { get; init; }
Property Value
ExchangeId
The exchange ID. See Exchanges for Massive's mapping of exchange IDs.
[JsonPropertyName("exchange")]
public int ExchangeId { get; init; }
Property Value
ParticipantTimestamp
The moment the exchange generated this trade, converted from ParticipantTimestampNanoseconds.
[JsonIgnore]
public Instant ParticipantTimestamp { get; }
Property Value
ParticipantTimestampNanoseconds
The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.
[JsonPropertyName("participant_timestamp")]
public long ParticipantTimestampNanoseconds { 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("price")]
public double Price { get; init; }
Property Value
SequenceNumber
The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.
[JsonPropertyName("sequence_number")]
public long SequenceNumber { get; init; }
Property Value
SipTimestamp
The moment the SIP received this trade, converted from SipTimestampNanoseconds.
[JsonIgnore]
public Instant SipTimestamp { get; }
Property Value
SipTimestampNanoseconds
The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.
[JsonPropertyName("sip_timestamp")]
public long SipTimestampNanoseconds { get; init; }
Property Value
Size
The size of a trade (also known as volume).
[JsonPropertyName("size")]
public double Size { get; init; }
Property Value
Tape
There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C. * Tape A is NYSE listed securities * Tape B is NYSE ARCA / NYSE American * Tape C is NASDAQ
[JsonPropertyName("tape")]
public int? Tape { get; init; }
Property Value
- int?
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("id")]
public required string TradeId { get; init; }
Property Value
TrfId
The ID for the Trade Reporting Facility where the trade took place.
[JsonPropertyName("trf_id")]
public int? TrfId { get; init; }
Property Value
- int?
TrfTimestamp
The moment the trade reporting facility received this trade, converted from TrfTimestampNanoseconds, or null when the trade did not pass through one.
[JsonIgnore]
public Instant? TrfTimestamp { get; }
Property Value
TrfTimestampNanoseconds
The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.
[JsonPropertyName("trf_timestamp")]
public long? TrfTimestampNanoseconds { get; init; }
Property Value
- long?