Table of Contents

Class ListJobsParams

Namespace
DatabentoDotNet.Historical
Assembly
DatabentoDotNet.Historical.dll

The filters batch.list_jobs takes. Both are optional.

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

Remarks

Port of upstream's ListJobsParams (batch.rs:596-603). A default instance is a valid request that filters nothing, which is why nothing here is required and why ToQueryParameters() can return an empty list.

Leaving States unset is not the same as naming every state. Upstream documents the API's own default as "all except Expired" (batch.rs:597). #39 could not measure that — every job the probing account holds is Done — so the claim is repeated here as upstream's rather than as this library's, and a caller who wants expired jobs should name the states.

Properties

Since

The earliest submission time to include, or null for no lower bound.

public Instant? Since { get; init; }

Property Value

Instant?

Remarks

Compared against each job's ReceivedTimestamp and sent as Unix nanoseconds, as upstream does (batch.rs:153-155). #39 measured the filter working at day granularity: a since set past two of the four jobs' receipt times returned only the other two.

States

The job states to include, or null for the API's own default.

public IReadOnlyList<JobState>? States { get; init; }

Property Value

IReadOnlyList<JobState>

Remarks

Rendered as one comma-separated states parameter, which is upstream's spelling (batch.rs:141-152) and which #39 confirmed the API reads: states=done,queued answers with both. An unknown state is a 400 whose body enumerates the seven the API knows — which is how JobState came to have three members upstream lacks.

Methods

ToQueryParameters()

Renders these filters as the query string batch.list_jobs takes.

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

Returns

IReadOnlyList<KeyValuePair<string, string>>

The query parameters, empty when nothing is filtered.

Remarks

short is not rendered here, though it travels on the same request. It is not a filter — it selects which of two response shapes comes back — so ListJobsAsync(ListJobsParams?, CancellationToken) and ListJobsFullAsync(ListJobsParams?, CancellationToken) each add their own, which is also what stops a caller pairing this parameter set with the wrong return type.

An unset filter is omitted rather than sent empty, and a States list that is present but empty is treated as unset: an empty states= is not a request for no states, it is a malformed one.

Exceptions

ArgumentOutOfRangeException

States holds a value outside the defined JobState set.

OverflowException

Since is too far from the Unix epoch (roughly beyond the year 2262) for its nanosecond count to fit in a long. See CLAUDE.md, "Dates and times".