DatabentoDotNet.Live
0.10.0
Prefix Reserved
dotnet add package DatabentoDotNet.Live --version 0.10.0
NuGet\Install-Package DatabentoDotNet.Live -Version 0.10.0
<PackageReference Include="DatabentoDotNet.Live" Version="0.10.0" />
<PackageVersion Include="DatabentoDotNet.Live" Version="0.10.0" />
<PackageReference Include="DatabentoDotNet.Live" />
paket add DatabentoDotNet.Live --version 0.10.0
#r "nuget: DatabentoDotNet.Live, 0.10.0"
#:package DatabentoDotNet.Live@0.10.0
#addin nuget:?package=DatabentoDotNet.Live&version=0.10.0
#tool nuget:?package=DatabentoDotNet.Live&version=0.10.0
DatabentoDotNet.Live
Real-time and intraday-replay streaming from Databento, over the raw TCP
gateway protocol. A .NET port of databento-rs's live client.
0.10.0is a beta. The code is complete and tested; what is not yet settled is whether the public surface is the right shape. 1.0.0 undertakes not to break it, so the beta is when that undertaking is worth contesting — if something here is awkward to call, an issue now is much cheaper than a major version later.
using DatabentoDotNet;
using DatabentoDotNet.Dbn;
using DatabentoDotNet.Live;
await using var client = new LiveClient
{
ApiKey = new ApiKey(Environment.GetEnvironmentVariable("DATABENTO_API_KEY")!),
Dataset = "EQUS.MINI",
};
await client.SubscribeAsync(new Subscription
{
Schema = Schema.Trades,
Symbols = Symbols.From(["AAPL", "MSFT"]),
});
await client.StartAsync();
while (await client.FillBufferAsync() > 0)
{
while (client.TryNextRecord(out RecordRef record))
{
if (record.TryGet(out TradeMsg trade))
Console.WriteLine($"{DbnTime.ToInstant(trade.IndexTs)} {trade.Price} x {trade.Size}");
}
}
Why it is a pair of calls and not one
Upstream's next_record() does not port, and cannot. An async method may not return a
ref struct, so there is no Task<RecordRef> — the split is FillBufferAsync (awaits bytes) and
TryNextRecord (reinterprets them in place, synchronously). That is the same lifetime rule the
decoder imposes, enforced by the compiler rather than by documentation: a RecordRef that tried to
survive an await fails to compile with CS4007.
Decoding allocates nothing per record, over a real socket — asserted in the test suite against a
mock gateway, not just reported by a benchmark. If you would rather have heap copies than manage that
lifetime, RecordsAsync gives you an IAsyncEnumerable and pays for it.
Dependencies
NodaTime — every timeout and HeartbeatInterval is a Duration, because
TimeSpan is banned repo-wide — plus DatabentoDotNet.Dbn and ZstdSharp.Port, the latter for a
session that negotiated compression=zstd.
Documentation
The API reference is the XML documentation shipped inside this package. Guides, the reconnect and
start_session semantics, and troubleshooting are at
jerbersoft.github.io/databentodotnet — start with
Live Streaming.
Source, issues, and roadmap: https://github.com/jerbersoft/databentodotnet.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- DatabentoDotNet.Dbn (>= 0.10.0)
- NodaTime (>= 3.3.3)
- ZstdSharp.Port (>= 0.8.8)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DatabentoDotNet.Live:
| Package | Downloads |
|---|---|
|
DatabentoDotNet.Extensions.Hosting
Databento for ASP.NET Core and the .NET generic host: IServiceCollection registration for the historical, reference and live clients, IConfiguration binding, and a hosted live-streaming service with bounded reconnection, health checks and metrics. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.10.0 | 113 | 9/1/2026 |
| 0.9.1 | 101 | 8/31/2026 |
| 0.9.0 | 105 | 8/30/2026 |
| 0.1.0-alpha | 100 | 8/29/2026 |