Class LiveGateway
- Namespace
- DatabentoDotNet.Live
- Assembly
- DatabentoDotNet.Live.dll
Derives the live gateway's host name from a dataset code.
public static class LiveGateway
- Inheritance
-
LiveGateway
- Inherited Members
Remarks
Port of upstream's determine_gateway (live/protocol.rs:26-31): lowercase the
dataset and replace every . with a -, then prepend it as a subdomain of
lsg.databento.com on port DefaultPort. GLBX.MDP3 becomes
glbx-mdp3.lsg.databento.com:13000. Plain TCP — no TLS anywhere in the live protocol.
The dataset is not checked against the Dataset enum, deliberately. Upstream
performs no validation and says so in its own doc comment, and the reason survives the port:
Databento adds datasets faster than a table generated from one release of publishers.rs
tracks them, so an enum check would reject a dataset that exists in favour of one this build
happens to know about. Refusing to connect because our table is stale is a worse failure than
a DNS error naming the host that does not resolve.
What is checked is that the transformation produced something that can be a DNS label at all — see For(string). That rejects the input a typo produces without ever claiming to know which datasets exist.
Fields
DefaultPort
The port every live gateway listens on.
public const int DefaultPort = 13000
Field Value
Domain
The domain the per-dataset subdomain is prepended to.
public const string Domain = "lsg.databento.com"
Field Value
Methods
For(string)
Returns the gateway endpoint for dataset. Resolves no DNS — the result
is a DnsEndPoint naming a host, not an address.
public static DnsEndPoint For(string dataset)
Parameters
datasetstringThe dataset code, in its wire spelling, such as
GLBX.MDP3.
Returns
- DnsEndPoint
The gateway endpoint.
Exceptions
- ArgumentException
datasetis empty or white space, or the subdomain it produces could not be a DNS label: too long, or carrying a character other thana-z,0-9and-, or beginning or ending with-.