Table of Contents

Class SecurityMasterGetLastParams

Namespace
DatabentoDotNet.Reference
Assembly
DatabentoDotNet.Reference.dll

The parameter set security_master.get_last takes: which symbols, optionally narrowed to a set of countries or security types. There is no range, and no index to apply one to.

public sealed record SecurityMasterGetLastParams : IEquatable<SecurityMasterGetLastParams>
Inheritance
SecurityMasterGetLastParams
Implements
Inherited Members

Remarks

Port of upstream's security::GetLastParams (security.rs:132-157).

This is SecurityMasterGetRangeParams minus index, start and end, and the two types share no inheritance. The endpoint returns the latest record per security, so there is nothing for a range to select and nothing for an index to filter on — a request carrying one would be a request the API does not have. If this type derived from the other, a caller could hand a fully specified range to GetLastAsync(SecurityMasterGetLastParams, CancellationToken) and have it silently discarded; separate types make that a compile error instead. The cost is four properties written twice, which the tests treat as a claim to check rather than as an invariant to trust.

compression is not a property here either, for the reason SecurityMasterGetRangeParams gives.

Properties

AllocateIsins

Whether the request may allocate new ISINs on an ISIN-limited plan. Defaults to true, as upstream's builder does.

public bool AllocateIsins { get; init; }

Property Value

bool

Remarks

The same billing consequence, and the same rule about tests that reach the real API, as AllocateIsins — which carries both in full.

Countries

The countries to filter for, or null to include every country.

public IReadOnlyList<Country>? Countries { get; init; }

Property Value

IReadOnlyList<Country>

Remarks

An empty sequence means the same thing as null: the parameter is left out. A default Country in the list is a caller mistake and is refused — see Render<T>(IEnumerable<T>?).

SecurityTypes

The security types to filter for, or null to include every type.

public IReadOnlyList<SecurityType>? SecurityTypes { get; init; }

Property Value

IReadOnlyList<SecurityType>

Remarks

An empty sequence behaves as null, as with Countries.

StypeIn

The symbology Symbols is expressed in. Defaults to RawSymbol, as upstream's builder does.

public SType StypeIn { get; init; }

Property Value

SType

Symbols

The symbols to filter for.

public required Symbols Symbols { get; init; }

Property Value

Symbols

Methods

ToFormParameters()

Renders this parameter set as the form body security_master.get_last posts.

public IReadOnlyList<KeyValuePair<string, string>> ToFormParameters()

Returns

IReadOnlyList<KeyValuePair<string, string>>

The form fields, in upstream's push order.

Remarks

The order is upstream's push order (security.rs:66-73): stype_in precedes symbols, allocate_isins and compression follow, and the two optional filters come last.

For a request with no country or security-type filter, the key set is exactly {stype_in, symbols, allocate_isins, compression} — four fields, with nothing sent empty and no range of any spelling.

Exceptions

InvalidOperationException

Symbols is left at its type's default value. required forces a caller to assign it but does not stop them assigning default, and ToApiString() refuses to render one.

ArgumentException

A default Country or SecurityType appears in a filter list.