B3.EntryPoint.Client.TestPeer
0.14.3
dotnet add package B3.EntryPoint.Client.TestPeer --version 0.14.3
NuGet\Install-Package B3.EntryPoint.Client.TestPeer -Version 0.14.3
<PackageReference Include="B3.EntryPoint.Client.TestPeer" Version="0.14.3" />
<PackageVersion Include="B3.EntryPoint.Client.TestPeer" Version="0.14.3" />
<PackageReference Include="B3.EntryPoint.Client.TestPeer" />
paket add B3.EntryPoint.Client.TestPeer --version 0.14.3
#r "nuget: B3.EntryPoint.Client.TestPeer, 0.14.3"
#:package B3.EntryPoint.Client.TestPeer@0.14.3
#addin nuget:?package=B3.EntryPoint.Client.TestPeer&version=0.14.3
#tool nuget:?package=B3.EntryPoint.Client.TestPeer&version=0.14.3
B3EntryPointClient
Wire-puro client library for the B3 EntryPoint (SBE/FIXP 8.4.2) order-entry
protocol. Symmetric counterpart of B3MarketDataPlatform (UMDF consumer):
this library produces orders and consumes ExecutionReports. The
conformance suite drives any peer that speaks the protocol — locally a
B3MatchingPlatform simulator, or the real B3 UAT environment with a
config swap.
Where this fits
| Repo | Role | Wire IN | Wire OUT |
|---|---|---|---|
B3MatchingPlatform |
Exchange (matching engine + UMDF publisher) | EntryPoint orders | UMDF MD + EntryPoint ER |
B3MarketDataPlatform |
Market-data subscriber | UMDF | — |
B3TradingPlatform |
Participant / OMS-like backend | EntryPoint ER | EntryPoint orders |
B3EntryPointClient (this repo) |
Wire-puro client lib + conformance suite | EntryPoint ER | EntryPoint orders |
B3TradingPlatform will consume this library. The whole point of staying
wire-puro is so the same code can drive the simulator or B3 UAT.
What's inside
B3.EntryPoint.Sbe— SBE bindings generated fromschemas/b3-entrypoint-messages-8.4.2.xmlviaSbeSourceGenerator. The schema is a vendored byte-identical copy of the one inB3MatchingPlatform.B3.EntryPoint.Client— the public client library:Framing/(SOFH),Fixp/(FIXP client state machine + session),Auth/,Models/,EntryPointClient.cs(high-level API).B3.EntryPoint.Cli— thin CLI wrapper for manual smoke testing (connectonly in the bootstrap).samples/B3.EntryPoint.Quickstart— end-to-end console demo against the in-memory FIXP peer. See Quickstart.
Install
dotnet add package B3.EntryPoint.Client
# Optional: only the SBE 8.4.2 codecs (no FIXP session layer)
dotnet add package B3.EntryPoint.Sbe
# Optional: in-process FIXP test peer for integration tests
dotnet add package B3.EntryPoint.Client.TestPeer
Targets net10.0. Symbols are published as .snupkg to nuget.org (sourcelink-enabled).
Quickstart
dotnet run --project samples/B3.EntryPoint.Quickstart
Full walkthrough: docs/QUICKSTART.md.
Testing without a real B3 endpoint
The companion B3.EntryPoint.Client.TestPeer package gives downstream
projects a drop-in in-process FIXP peer for Mode=Real integration tests.
See docs/TEST-PEER.md for configuration, scenarios,
and observability.
Build & test
dotnet build SbeB3EntryPointClient.slnx
dotnet test SbeB3EntryPointClient.slnx
Minimum-viable usage
using B3.EntryPoint.Client;
using B3.EntryPoint.Client.Auth;
await using var client = new EntryPointClient(new EntryPointClientOptions
{
Endpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9876),
SessionId = 1,
SessionVerId = 1,
EnteringFirm = 1234,
Credentials = Credentials.FromUtf8("dev-shared-secret"),
});
await client.ConnectAsync(); // TCP + Negotiate + Establish
// client.State == FixpClientState.Established
The high-level SubmitOrderAsync and unsolicited Events stream are wired
in subsequent PRs (see docs/CONFORMANCE.md for the
spec-driven scenario inventory). The bootstrap intentionally ships their
shape only so B3TradingPlatform can compile against the API.
Conformance suite
tests/B3.EntryPoint.Conformance/ is organised one folder per spec section
(Spec_4_5_Negotiate/, Spec_4_6_Sequencing/, …). Tests using
[ConformanceFact] are auto-skipped when the peer env vars
(B3EP_PEER, B3EP_SESSION_ID, B3EP_SESSION_VER_ID, B3EP_FIRM,
B3EP_ACCESS_KEY) are not set, so CI is green without a peer configured.
To run against a local B3MatchingPlatform:
export B3EP_PEER=127.0.0.1:9876
export B3EP_SESSION_ID=1
export B3EP_SESSION_VER_ID=1
export B3EP_FIRM=1234
export B3EP_ACCESS_KEY=dev-shared-secret
dotnet test tests/B3.EntryPoint.Conformance --filter "Category=Conformance"
Schemas
schemas/b3-entrypoint-messages-8.4.2.xml is the official B3 SBE schema, kept
byte-identical with the copy in B3MatchingPlatform. Do not hand-edit;
regenerate the bindings when upgrading and mirror the change there.
Status
The wire-puro client is feature-complete for the schemas currently shipped (SBE FIXP 8.4.2 order-entry + drop-copy). All session, order-flow and inbound decoder paths are implemented and exercised by the in-process conformance suite.
| Área | Estado |
|---|---|
| Reliability §4.6 — Sequence / Heartbeat | ✅ wired |
| Reliability §4.7 — Retransmit / NotApplied | ✅ wired |
| Reliability §4.8 — Terminate / Reconnect / CancelOnDisconnect | ✅ wired |
Order Entry — ISubmitOrder (NewOrderSingle / SimpleNewOrder) |
✅ wired |
Order Entry — IReplaceOrder (OrderCancelReplace / SimpleModify) |
✅ wired |
Order Entry — ICancelOrder + OrderMassAction |
✅ wired |
| ExecutionReport family + BusinessMessageReject (Events stream) | ✅ wired |
Cross / Quote (ISubmitCross, IQuoteFlow) |
✅ wired |
Drop Copy session profile (DropCopyClient + IDropCopyClient) |
✅ wired |
| AllocationReport / PositionMaintenanceReport inbound decoders | ✅ wired |
| Conformance §4.5..§4.8 + Order Entry + Drop Copy | ✅ in-process suite |
DI helpers (AddEntryPointClient, AddDropCopyClient) |
✅ shipped |
IEntryPointClient / IDropCopyClient interfaces for mocking |
✅ shipped |
| PublicApiAnalyzers gating breaking changes | ✅ shipped |
SourceLink + .snupkg published to nuget.org |
✅ shipped |
SecurityDefinitionRequest and outbound AllocationInstruction /
PositionMaintenanceRequest are intentionally out of scope until they
appear in the schema bundle.
Benchmarks
Micro-benchmarks live in benchmarks/B3.EntryPoint.Benchmarks
and exercise the hot paths the matching platform pays for on every order
(DTO construction, pre-trade risk gates, polymorphic session-state delta
serialization). Run locally:
dotnet run -c Release --project benchmarks/B3.EntryPoint.Benchmarks -- --filter '*'
Or trigger the Benchmarks workflow via
workflow_dispatch to run on CI and download the artifacts.
Releasing (NuGet)
Both packages ship from the same git tag:
- Bump
<Version>inDirectory.Build.propsand updateCHANGELOG.md. - Commit, then tag:
git tag v0.5.0 && git push origin v0.5.0(usev0.5.0-alpha.1for pre-releases). - The
Publish NuGetworkflow runs onv*tags: it builds, tests, packs, and pushes both.nupkg+.snupkgto nuget.org via theNUGET_API_KEYrepo secret.
Without NUGET_API_KEY, the workflow still produces uploadable artifacts you can grab from the run page.
License
MIT — see LICENSE.
| 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
- B3.EntryPoint.Client (>= 0.14.3)
- B3.EntryPoint.Sbe (>= 0.14.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Options (>= 10.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.