Package com.quantfinlib.fix


package com.quantfinlib.fix
Zero-dependency FIX 4.4 engine. FixMessage (validated codec: BodyLength + CheckSum framing) and FixSession (initiator and acceptor roles): Logon with optional Username/Password, heartbeats with TestRequest probing, sequence tracking with full ResendRequest recovery (PossDup replays, SequenceReset-GapFill, duplicate suppression), session Reject handling, Logout handshake, and optional durable FileSessionStore for seqnum continuation across restarts. Application flow: NewOrderSingle, cancel/replace (35=F/G) and typed ExecutionReports.

Garbage-free hot path (flyweights over framed bytes, scaled-long prices): FixOrderEncoder (orders out), FixExecReportView (fills in) and FixMarketDataView (35=W/X tiered quotes in) — feed to order without touching a String or a double.

  • Class
    Description
    Typed view of a FIX ExecutionReport (35=8) — the venue's answer to an order: acknowledgement, fill, or rejection.
    Durable FixSessionStore backed by two files in a directory: seqnums.dat (16 bytes, synchronous writes) and an append-only messages.dat replayed into memory on open.
    Garbage-free FIX 4.4 ExecutionReport reader — the inbound half of the FIX hot path, completing the round trip FixOrderEncoder started: order out garbage-free, fill in garbage-free.
    Garbage-free FIX 4.4 market-data reader — the feed half of the FIX hot path.
    FIX 4.4 wire-format message: tag=value fields delimited by SOH, framed by BeginString(8) / BodyLength(9) / CheckSum(10).
    Body-field builder; the session supplies header fields at encode time.
    Garbage-free FIX 4.4 NewOrderSingle encoder — the hot-lane counterpart of the String-based NewOrderSingle/FixMessage codec, for venues that only speak FIX (where the sbe binary adapters aren't an option, order entry IS the FIX edge, and per-order String building would put allocation back on the measured path).
    FIX 4.4 session over TCP — initiator or acceptor — implementing the session protocol needed to trade: Logon handshake, Heartbeats with TestRequest probing and staleness disconnect, sequence-number tracking with gap detection, Logout handshake, and the application flow NewOrderSingle out / ExecutionReport in (or the reverse, on the venue side).
     
    Session callbacks; invoked on the session's reader thread.
    Persistence seam for a FixSession: sequence numbers and the outbound application-message store.
     
    One stored outbound application message, replayable on ResendRequest.
    Typed view of a FIX NewOrderSingle (35=D).
    Typed view of a FIX OrderCancelReplaceRequest (35=G) — amend a working order's quantity and/or price.
    Typed view of a FIX OrderCancelRequest (35=F).