Table of Contents

Struct LastTrade

Namespace
MassiveDotNet.Rest.Models
Assembly
MassiveDotNet.Rest.dll

The most recent trade for a ticker: price, size, exchange, conditions, and three nanosecond timestamps.

[JsonConverter(typeof(LastTradeJsonConverter))]
public readonly record struct LastTrade : IEquatable<LastTrade>
Implements
Inherited Members

Remarks

A tick-level type, so a struct (decision D4). The v2 wire keys are single letters, which the map names. Timestamps are stored as nanosecond long values and exposed as Instant only when read (decision D5).

Properties

Conditions

A list of condition codes.

[JsonPropertyName("c")]
[JsonConverter(typeof(PooledArrayConverter<int>))]
public int[]? Conditions { get; init; }

Property Value

int[]

CorrectionIndicator

The trade correction indicator.

[JsonPropertyName("e")]
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("ds")]
public decimal DecimalSize { get; init; }

Property Value

decimal

ExchangeId

The exchange ID. See Exchanges for Massive's mapping of exchange IDs.

[JsonPropertyName("x")]
public int ExchangeId { get; init; }

Property Value

int

ParticipantTimestamp

The moment the exchange generated this trade, converted from ParticipantTimestampNanoseconds.

[JsonIgnore]
public Instant ParticipantTimestamp { get; }

Property Value

Instant

ParticipantTimestampNanoseconds

The nanosecond Unix timestamp at which the trade was generated at the exchange.

[JsonPropertyName("y")]
public long ParticipantTimestampNanoseconds { get; init; }

Property Value

long

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

double

SequenceNumber

The sequence number represents the sequence in which message events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11).

[JsonPropertyName("q")]
public long SequenceNumber { get; init; }

Property Value

long

SipTimestamp

The moment the SIP received this trade, converted from SipTimestampNanoseconds.

[JsonIgnore]
public Instant SipTimestamp { get; }

Property Value

Instant

SipTimestampNanoseconds

The nanosecond Unix timestamp at which the SIP received this trade from the exchange that produced it.

[JsonPropertyName("t")]
public long SipTimestampNanoseconds { get; init; }

Property Value

long

Size

The size of a trade (also known as volume).

[JsonPropertyName("s")]
public double? Size { get; init; }

Property Value

double?

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("z")]
public int? Tape { get; init; }

Property Value

int?

Ticker

The exchange symbol that this item is traded under.

[JsonPropertyName("T")]
public required string Ticker { get; init; }

Property Value

string

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; }

Property Value

string

TrfId

The ID for the Trade Reporting Facility where the trade took place.

[JsonPropertyName("r")]
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

Instant?

TrfTimestampNanoseconds

The nanosecond Unix timestamp at which the trade reporting facility received this trade, when it passed through one.

[JsonPropertyName("f")]
public long? TrfTimestampNanoseconds { get; init; }

Property Value

long?