Table of Contents

Struct Frequency

Namespace
DatabentoDotNet.Reference
Assembly
DatabentoDotNet.Reference.dll

How often a distribution recurs.

[JsonConverter(typeof(ReferenceCodeJsonConverter<Frequency>))]
public readonly record struct Frequency : IReferenceCode<Frequency>, IEquatable<Frequency>
Implements
Inherited Members

Remarks

An open set: a code this library does not know is carried, not lost. Upstream ends this enum in an Unknown(String) variant (enums.rs:2799) so a code Databento adds next month round-trips untouched, and a C# enum cannot hold a payload. See IReferenceCode<TSelf> for the shape this takes instead and why.

The members come from the FREQ group of the vendored corporate_actions.list_enums response, which is the oracle rather than a count typed into an issue.

The one type here whose members are named after their descriptions rather than their codes, because upstream names them that way. Upstream falls back to the code where the description is more than one word, which is why Intonmat and Itm — which share the description "Interest on Maturity" — keep their codes. BiWeekly and Fortnightly are the two the live dictionary has and upstream does not; both names fall out of that same rule.

Constructors

Frequency(string)

Wraps a wire code, known or not. Prefer a named member such as Annual where one exists, and From(string?) where the value came from the server.

public Frequency(string code)

Parameters

code string

The wire code.

Exceptions

ArgumentException

code is null or empty. A blank code is the absence of a value, which is default.

Properties

Annual

Annual (ANL).

public static Frequency Annual { get; }

Property Value

Frequency

BiMonthly

BiMonthly (BIM).

public static Frequency BiMonthly { get; }

Property Value

Frequency

BiWeekly

BiWeekly (BIW).

public static Frequency BiWeekly { get; }

Property Value

Frequency

Code

The wire code, or null when this names no value.

public string? Code { get; }

Property Value

string

Daily

Daily (DLY).

public static Frequency Daily { get; }

Property Value

Frequency

Final

Final (FNL).

public static Frequency Final { get; }

Property Value

Frequency

Fortnightly

Fortnightly (FRT).

public static Frequency Fortnightly { get; }

Property Value

Frequency

HasValue

true when this names a code — known or not.

public bool HasValue { get; }

Property Value

bool

Interim

Interim (INT).

public static Frequency Interim { get; }

Property Value

Frequency

Intonmat

Interest on Maturity (INTONMAT).

public static Frequency Intonmat { get; }

Property Value

Frequency

Irregular

Irregular (IRG).

public static Frequency Irregular { get; }

Property Value

Frequency

IsKnown

true when Code is one of KnownCodes.

public bool IsKnown { get; }

Property Value

bool

Remarks

false is not an error. It means the server sent something newer than the table this library shipped with, and the code is still in Code to be read, logged, or sent back in a filter.

Itm

Interest on Maturity (ITM).

public static Frequency Itm { get; }

Property Value

Frequency

KnownCodes

Every code the reference API reported for this type when the fixture was captured — 16 of them.

public static IReadOnlySet<string> KnownCodes { get; }

Property Value

IReadOnlySet<string>

Monthly

Monthly (MNT).

public static Frequency Monthly { get; }

Property Value

Frequency

Quarterly

Quarterly (QTR).

public static Frequency Quarterly { get; }

Property Value

Frequency

SemiAnnual

Semi-Annual (SMA).

public static Frequency SemiAnnual { get; }

Property Value

Frequency

Trimesterly

Trimesterly (TRM).

public static Frequency Trimesterly { get; }

Property Value

Frequency

Unspecified

Unspecified (UN).

public static Frequency Unspecified { get; }

Property Value

Frequency

Weekly

Weekly (WKL).

public static Frequency Weekly { get; }

Property Value

Frequency

Methods

From(string?)

Reads a wire code, mapping null and the empty string to default — the absence of a value.

public static Frequency From(string? code)

Parameters

code string

The wire code, or null.

Returns

Frequency

The value.

ToString()

The wire code, or the empty string when this names no value.

public override string ToString()

Returns

string

The wire code.