Table of Contents

Class ListFieldsParams

Namespace
DatabentoDotNet.Historical
Assembly
DatabentoDotNet.Historical.dll

The parameters for metadata.list_fields, which lists the record fields for a schema and encoding.

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

Remarks

Port of upstream's ListFieldsParams (metadata.rs:245-256).

Properties

Dataset

The dataset used to determine which fields are relevant, or null to omit it from the request.

public string? Dataset { get; init; }

Property Value

string

Remarks

Leaving this unset changes what the API answers, not just what it accepts. Upstream documents this as a warning on the endpoint itself, not merely on the parameter (metadata.rs:70-73): when Dataset is absent, the API returns the fields for the latest DBN encoding version, which may differ from a specific dataset's schema. That is server behavior a caller only otherwise discovers from a wrong answer.

Encoding

The encoding to request fields for.

public required Encoding Encoding { get; init; }

Property Value

Encoding

Schema

The data record schema to request fields for.

public required Schema Schema { get; init; }

Property Value

Schema

Methods

ToQueryParameters()

Renders this parameter set as the query string the list_fields endpoint's GET request carries.

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

Returns

IReadOnlyList<KeyValuePair<string, string>>

The query parameters, in upstream's push order.

Remarks

The order matches upstream: encoding and schema are always sent, and dataset follows only when Dataset is set (metadata.rs:83-90).