Table of Contents

Struct Agg

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

A single aggregate bar: open, high, low, close, and volume for one time window.

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

Remarks

Aggregates are built only from qualifying trades. A window with no eligible trades produces no bar, so gaps in a series indicate an absence of trading activity rather than missing data.

Properties

Close

The close price for the symbol in the given time period.

[JsonPropertyName("c")]
public double Close { get; init; }

Property Value

double

High

The highest price for the symbol in the given time period.

[JsonPropertyName("h")]
public double High { get; init; }

Property Value

double

IsOtc

Whether this aggregate is for an OTC ticker. The API omits the field entirely when false, which deserializes to false here.

[JsonPropertyName("otc")]
public bool IsOtc { get; init; }

Property Value

bool

Low

The lowest price for the symbol in the given time period.

[JsonPropertyName("l")]
public double Low { get; init; }

Property Value

double

Open

The open price for the symbol in the given time period.

[JsonPropertyName("o")]
public double Open { get; init; }

Property Value

double

Timestamp

The start of the aggregate window, converted from TimestampMilliseconds.

[JsonIgnore]
public Instant Timestamp { get; }

Property Value

Instant

Remarks

The raw long is what gets deserialized and stored; this conversion happens only when read, so a large series costs nothing until the value is actually wanted.

TimestampMilliseconds

The Unix millisecond timestamp for the start of the aggregate window.

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

Property Value

long

TransactionCount

The number of transactions in the aggregate window.

[JsonPropertyName("n")]
public long? TransactionCount { get; init; }

Property Value

long?

Volume

The trading volume of the symbol in the given time period.

[JsonPropertyName("v")]
public double Volume { get; init; }

Property Value

double

VolumeWeightedAveragePrice

The volume weighted average price.

[JsonPropertyName("vw")]
public double? VolumeWeightedAveragePrice { get; init; }

Property Value

double?