Table of Contents

Struct StockAggregate

Namespace
MassiveDotNet.WebSocket.Events
Assembly
MassiveDotNet.WebSocket.dll

One streamed stock aggregate bar: the A and AM topics.

public readonly record struct StockAggregate : IEquatable<StockAggregate>
Implements
Inherited Members

Remarks

One model serves both topics because their wire shapes are field-for-field identical, differing only in the event code and the length of the window (D-W14). Which window produced a bar is readable from Start and End: one second apart, or sixty.

A high-volume type, so a struct (D4). Window bounds are stored as raw Unix millisecond values and exposed as Instant only when read (D5). The unit is this topic's own — the imbalance and limit up-limit down topics send nanoseconds for their timestamp field, and REST v3 sends nanoseconds for the conceptually similar tick timestamp.

Properties

AccumulatedVolume

Today's accumulated volume.

public long AccumulatedVolume { get; init; }

Property Value

long

AverageTradeSize

The average trade size within this window.

public long AverageTradeSize { get; init; }

Property Value

long

Close

The closing tick price for this window.

public double Close { get; init; }

Property Value

double

DailyVolumeWeightedAveragePrice

Today's volume weighted average price.

public double DailyVolumeWeightedAveragePrice { get; init; }

Property Value

double

DecimalAccumulatedVolume

Today's accumulated volume 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).

public decimal? DecimalAccumulatedVolume { get; init; }

Property Value

decimal?

DecimalVolume

The tick volume within this window 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).

public decimal? DecimalVolume { get; init; }

Property Value

decimal?

End

When this window closed.

public Instant End { get; }

Property Value

Instant

EndTimestampMilliseconds

The raw end of this window, in Unix milliseconds.

public long EndTimestampMilliseconds { get; init; }

Property Value

long

High

The highest tick price for this window.

public double High { get; init; }

Property Value

double

Low

The lowest tick price for this window.

public double Low { get; init; }

Property Value

double

OfficialOpenPrice

Today's official opening price.

public double OfficialOpenPrice { get; init; }

Property Value

double

Open

The opening tick price for this window.

public double Open { get; init; }

Property Value

double

Otc

Whether this bar is for an OTC ticker. The wire omits the field when false.

public bool Otc { get; init; }

Property Value

bool

Start

When this window opened.

public Instant Start { get; }

Property Value

Instant

StartTimestampMilliseconds

The raw start of this window, in Unix milliseconds.

public long StartTimestampMilliseconds { get; init; }

Property Value

long

Ticker

The ticker symbol, interned across events.

public required string Ticker { get; init; }

Property Value

string

Volume

The tick volume within this window.

public long Volume { get; init; }

Property Value

long

VolumeWeightedAveragePrice

This window's volume weighted average price.

public double VolumeWeightedAveragePrice { get; init; }

Property Value

double