Table of Contents

Class MassiveEnumValues

Namespace
MassiveDotNet
Assembly
MassiveDotNet.dll

Converts SDK enums to the literal strings the Massive platform API expects on the wire.

public static class MassiveEnumValues
Inheritance
MassiveEnumValues
Inherited Members

Remarks

These are plain switch expressions rather than reflection-driven conversion so that the SDK stays fully Native AOT compatible.

Methods

ToWireValue(AggregateTimespan)

Returns the wire representation of an AggregateTimespan.

public static string ToWireValue(this AggregateTimespan value)

Parameters

value AggregateTimespan

The value to convert.

Returns

string

The literal accepted by the API, for example "minute".

Exceptions

ArgumentOutOfRangeException

The value is not a defined enum member.

ToWireValue(ContractType)

Returns the wire representation of a ContractType.

public static string ToWireValue(this ContractType value)

Parameters

value ContractType

The value to convert.

Returns

string

Either "call" or "put", the query value the contracts route takes.

Exceptions

ArgumentOutOfRangeException

The value is not a defined enum member.

ToWireValue(MarketType)

Returns the wire representation of a MarketType.

public static string ToWireValue(this MarketType value)

Parameters

value MarketType

The value to convert.

Returns

string

The literal accepted by the API, for example "stocks".

Exceptions

ArgumentOutOfRangeException

The value is not a defined enum member.

ToWireValue(SeriesType)

Returns the wire representation of a SeriesType.

public static string ToWireValue(this SeriesType value)

Parameters

value SeriesType

The value to convert.

Returns

string

The literal accepted by the API, for example "close".

Exceptions

ArgumentOutOfRangeException

The value is not a defined enum member.

ToWireValue(SnapshotDirection)

Returns the wire representation of a SnapshotDirection.

public static string ToWireValue(this SnapshotDirection value)

Parameters

value SnapshotDirection

The value to convert.

Returns

string

Either "gainers" or "losers", the path segment the snapshot route takes.

Exceptions

ArgumentOutOfRangeException

The value is not a defined enum member.

ToWireValue(SortOrder)

Returns the wire representation of a SortOrder.

public static string ToWireValue(this SortOrder value)

Parameters

value SortOrder

The value to convert.

Returns

string

Either "asc" or "desc".

Exceptions

ArgumentOutOfRangeException

The value is not a defined enum member.

ToWireValue(Instant)

Returns the wire representation of an instant, as Unix milliseconds.

public static string ToWireValue(this Instant value)

Parameters

value Instant

The instant to convert.

Returns

string

Milliseconds since the Unix epoch.

ToWireValue(LocalDate)

Returns the wire representation of a calendar date.

public static string ToWireValue(this LocalDate value)

Parameters

value LocalDate

The date to convert.

Returns

string

The date in ISO YYYY-MM-DD form.

ToWireValueNanoseconds(Instant)

Returns the wire representation of an instant, as Unix nanoseconds.

public static string ToWireValueNanoseconds(this Instant value)

Parameters

value Instant

The instant to convert.

Returns

string

Nanoseconds since the Unix epoch, used by the tick-level endpoints.