Class HistoricalOptions
- Namespace
- DatabentoDotNet.Extensions.Hosting
- Assembly
- DatabentoDotNet.Extensions.Hosting.dll
Configuration for the historical and reference clients, which share one transport.
public sealed class HistoricalOptions
- Inheritance
-
HistoricalOptions
- Inherited Members
Properties
ApiKey
public string? ApiKey { get; set; }
Property Value
BaseUrl
A base URL to send requests to instead of the gateway's, or null for the gateway. For a proxy or a test harness.
public string? BaseUrl { get; set; }
Property Value
PooledConnectionLifetime
How long a pooled connection may be reused before it is replaced, as an ISO-8601 duration.
Defaults to PT5M.
public string? PooledConnectionLifetime { get; set; }
Property Value
Remarks
This is the reason the package registers an IHttpClientFactory handler at all.
HttpClient's own handler leaves
PooledConnectionLifetime infinite, so a singleton in a host that stays up for weeks
keeps talking to whatever address hist.databento.com resolved to on its first
request. Five minutes is what the .NET documentation recommends for a long-lived client.
A string because T:System.TimeSpan is banned as a type repo-wide
and NodaTime's Duration has nothing for a binder to fill. ISO-8601 is unambiguous
across locales, which InvariantGlobalization makes a live concern.
UserAgentExtension
Text identifying the application, appended to this library's User-Agent.
public string? UserAgentExtension { get; set; }