B3.MarketData.WebSocketClient 0.1.0

dotnet add package B3.MarketData.WebSocketClient --version 0.1.0
                    
NuGet\Install-Package B3.MarketData.WebSocketClient -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="B3.MarketData.WebSocketClient" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="B3.MarketData.WebSocketClient" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="B3.MarketData.WebSocketClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add B3.MarketData.WebSocketClient --version 0.1.0
                    
#r "nuget: B3.MarketData.WebSocketClient, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package B3.MarketData.WebSocketClient@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=B3.MarketData.WebSocketClient&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=B3.MarketData.WebSocketClient&version=0.1.0
                    
Install as a Cake Tool

B3.MarketData.WebSocketClient

Typed C# subscriber SDK for the B3MarketDataPlatform WebSocket distribution layer.

This v1 release covers the reference-price use case (trade prints, info snapshots, server status) — the same surface documented in docs/WEBSOCKET_API.md, exposed as typed events with the SBE 4-decimal price exponent already applied so consumers never see the raw i64 mantissa.

using B3.MarketData.WebSocketClient;

await using var client = new MarketDataClient(new MarketDataClientOptions
{
    Endpoint = new Uri("ws://localhost:8080/ws"),
});

client.Trade += t => Console.WriteLine($"{t.Symbol}  {t.Price:F4} x {t.Qty}");

await client.ConnectAsync();
await client.SubscribeAsync("PETR4");

Includes:

  • Transparent reconnect with exponential back-off + automatic re-subscribe of every active subscription.
  • Bounded back-pressure (Channel<T> with a configurable policy: DropOldest / Block / Throw).
  • DI extension: services.AddMarketDataClient(...).

Out of scope for v1: full L2/MBO subscription, recovery REST endpoints.

See docs/CLIENT-SDK.md for the full guide.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 913 5/2/2026