Package com.quantfinlib.sbe


package com.quantfinlib.sbe
SBE-style binary wire codecs and channel adapters — the professional-grade alternative to the text edges (JSON WebSocket in, FIX tag-value out): TradeFlyweight, OrderFlyweight and QuoteFlyweight encode/decode at fixed buffer offsets with zero allocation, zero parsing and zero copying; BinaryMarketDataClient feeds the HftMarketDataBus from a binary stream and BinaryOrderPublisher/BinaryOrderReceiver carry gateway orders over a binary channel. Wire layouts are documented on each flyweight; symbol ids are part of the wire contract.

See docs/ULTRA_LOW_LATENCY.md for where this sits in the latency stack.

  • Classes
    Class
    Description
    Binary market-data adapter: decodes TradeFlyweight frames from a channel straight into the HftMarketDataBus — the professional-grade counterpart of the text feed.WebSocketFeed.
    Binary order-entry adapter: attach to HftOrderGateway as its OrderListener and every accepted order is encoded as an OrderFlyweight and written to the venue channel — the binary counterpart of fix.FixSession#sendNewOrderSingle, with zero allocation and zero string formatting per order.
    Venue side of the binary order-entry pair: decodes OrderFlyweight frames from a channel and dispatches them to an OrderListener — same zero-allocation read loop as BinaryMarketDataClient, with partial-frame handling.
    SBE-style flyweight codec for an order-entry message — the binary counterpart of a FIX NewOrderSingle, at fixed offsets with zero allocation and zero parsing (see TradeFlyweight for the pattern).
    SBE-style flyweight codec for a two-sided quote message — the outbound format of a market maker (and the inbound format of venue top-of-book feeds), completing the binary codec family: TradeFlyweight (trade in), OrderFlyweight (order out), quote (two-sided out).
    SBE-style flyweight codec for a market-data trade message: fixed field offsets over a ByteBuffer, so encode/decode is a handful of absolute primitive reads/writes — zero allocation, zero parsing, zero copying.