Table of Contents

Class AdjustmentFactorsGetRangeParams

Namespace
DatabentoDotNet.Reference
Assembly
DatabentoDotNet.Reference.dll

The parameter set adjustment_factors.get_range takes: which symbols, over what range, optionally narrowed to a set of countries or security types.

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

Remarks

Port of upstream's adjustment::GetRangeParams (adjustment.rs:56-88). Named for its endpoint rather than as a bare GetRangeParams: upstream can reuse that name in three modules of one crate, C# cannot reuse it in one namespace, and GetRangeParams has already claimed the short spelling for timeseries.get_range.

compression is not a property, because it is not a choice. Upstream hard-codes compression=zstd on this endpoint (adjustment.rs:36) and so does ToFormParameters(). The response handler requires the frame — an uncompressed body would not parse — so a caller who could set it could only break the request. GetRangeParams makes the same call for the same reason.

Countries and SecurityTypes are omitted when empty rather than sent empty. Upstream's AddToForm impls push nothing for an empty Vec (reference.rs:266-296), and countries= is a different request from no countries at all — the same distinction ReferenceDateTimeRange draws for an absent end.

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

A billing consequence hiding in a default. Left at true, a request for symbols the plan has not seen before can create new allocations against an ISIN-limited entitlement; set it false and the API drops the rows that would have done so rather than returning them. The default is upstream's and is kept, because a client that silently returned fewer rows than upstream for the same parameters would be the worse surprise — but it is the reason this property is documented at length rather than listed.

Unprobed here, like every other billing behaviour of these three endpoints; #57 owns the gated request that can measure it.

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>?).

DateTimeRange

The request range: inclusive start, optional exclusive end.

public required ReferenceDateTimeRange DateTimeRange { get; init; }

Property Value

ReferenceDateTimeRange

Remarks

Filters on index, per upstream (adjustment.rs:60, :63). Omit the end and the response runs to the end of the data — see ReferenceDateTimeRange, which also records that the exclusive end is documented rather than probed.

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 adjustment_factors.get_range 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 (adjustment.rs:32-41), which is not the order the properties are declared in: stype_in precedes symbols, allocate_isins and compression sit before the range, and the two optional filters come last. It makes no difference to the API and it makes the rendered body byte-comparable with upstream's, which is the cheapest way to tell this rendering apart from a plausible one — the same argument ToFormParameters() makes for its own order.

For a request with no country or security-type filter and an open range, the key set is exactly {stype_in, symbols, allocate_isins, compression, start} — five fields, with nothing sent empty.

Exceptions

InvalidOperationException

Symbols or DateTimeRange is left at its type's default value. required forces a caller to assign each property but does not stop them assigning default, and the accessors this reads refuse to render one.

ArgumentException

A default Country or SecurityType appears in a filter list.