MassiveDotNet.WebSocket
0.2.0
See the version list below for details.
dotnet add package MassiveDotNet.WebSocket --version 0.2.0
NuGet\Install-Package MassiveDotNet.WebSocket -Version 0.2.0
<PackageReference Include="MassiveDotNet.WebSocket" Version="0.2.0" />
<PackageVersion Include="MassiveDotNet.WebSocket" Version="0.2.0" />
<PackageReference Include="MassiveDotNet.WebSocket" />
paket add MassiveDotNet.WebSocket --version 0.2.0
#r "nuget: MassiveDotNet.WebSocket, 0.2.0"
#:package MassiveDotNet.WebSocket@0.2.0
#addin nuget:?package=MassiveDotNet.WebSocket&version=0.2.0
#tool nuget:?package=MassiveDotNet.WebSocket&version=0.2.0
MassiveDotNet.WebSocket
WebSocket streaming client for the Massive market data platform (formerly Polygon.io), for .NET 10.
dotnet add package MassiveDotNet.WebSocket
Quick start
using MassiveDotNet.WebSocket;
using MassiveDotNet.WebSocket.Events;
await using MassiveStreamClient client = new(new MassiveStreamOptions { ApiKey = apiKey });
await using MassiveStockStream stream = await client.ConnectStocksAsync();
MassiveTopicSubscription<StockTrade> trades = await stream.SubscribeTradesAsync(["AAPL"]);
await foreach (StockTrade trade in trades)
{
Console.WriteLine($"{trade.Ticker} {trade.Price:N2} x {trade.Size} at {trade.SipTimestamp}");
}
Six stock topics, each returning a MassiveTopicSubscription<T> over its own event type:
SubscribeTradesAsync, SubscribeQuotesAsync, SubscribeSecondAggregatesAsync,
SubscribeMinuteAggregatesAsync, SubscribeImbalancesAsync, SubscribeLimitUpLimitDownAsync.
Two things worth knowing
Topics are a typed enum, not a string. The server silently drops a topic code it does not
recognise — no acknowledgement, no error — so a caller who mistyped a string would see a healthy
connection producing nothing, indefinitely. Every subscribe is acknowledgement-counted for the same
reason and throws MassiveStreamSubscriptionException when the server accepted fewer pairs than
were asked for. When the server refuses out loud, the exception carries what it actually said.
A slow consumer drops the oldest event, and never blocks. Each topic owns one bounded buffer
(1024 events by default). Every topic shares one socket, so a writer that waited would stall the
read loop and cost you the topics that were keeping up. Drops are counted exactly on
DroppedCount and raised as an event; the DI package bridges that count to ILogger.
Reconnect is automatic, with backoff, and replays every subscription. If the replay's
acknowledgements fall short, SubscriptionsLost names the pairs that went unanswered rather than
leaving you with a connection that looks healthy.
Native AOT clean, hand-written event converters reading straight off Utf8JsonReader, and parsing
a frame allocates nothing beyond the event itself.
Licensed MIT. Issues and source at github.com/jerbersoft/massivedotnet.
| 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
- MassiveDotNet (>= 0.2.0)
- NodaTime (>= 3.3.3)
- System.Threading.RateLimiting (>= 10.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MassiveDotNet.WebSocket:
| Package | Downloads |
|---|---|
|
MassiveDotNet.Extensions.DependencyInjection
Dependency injection and IHttpClientFactory integration for the MassiveDotNet SDK, for ASP.NET Core, the Generic Host, and any app with a service collection. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.4.2-ci.64 | 68 | 9/26/2026 |
| 0.4.1 | 120 | 9/24/2026 |
| 0.4.1-ci.59 | 54 | 9/24/2026 |
| 0.4.0 | 95 | 9/24/2026 |
| 0.4.0-ci.58 | 61 | 9/24/2026 |
| 0.4.0-ci.55 | 56 | 9/24/2026 |
| 0.4.0-ci.54 | 63 | 9/23/2026 |
| 0.4.0-ci.53 | 58 | 9/23/2026 |
| 0.4.0-ci.52 | 68 | 9/23/2026 |
| 0.4.0-ci.51 | 58 | 9/23/2026 |
| 0.4.0-ci.49 | 62 | 9/22/2026 |
| 0.3.0 | 94 | 9/22/2026 |
| 0.3.0-ci.48 | 60 | 9/22/2026 |
| 0.3.0-ci.47 | 69 | 9/22/2026 |
| 0.3.0-ci.46 | 80 | 9/9/2026 |
| 0.3.0-ci.45 | 74 | 9/9/2026 |
| 0.2.0 | 119 | 9/9/2026 |
| 0.2.0-ci.44 | 75 | 9/9/2026 |
| 0.2.0-ci.42 | 75 | 9/9/2026 |
| 0.2.0-ci.41 | 79 | 9/9/2026 |