One API to all FX
Whisperer offers one API to provide market data, trading and drop-copy functions against a wide range of foreign exchange and futures ECNs (collectively referred to as “Trading Venues”).
Each Trading Venue has its own combination of transport, message format and conventions for market data and order management. Whisperer normalizes these differences via a common interface whilst preserving the key semantic details of the original messages.
As with our previous SBE offering, MarketFactory provides a reference client implementation in Java, using a Zero-GC, single threaded implementation model. This is based on the the SBE reference sources and illustrates the end result of using the the Real Logic compiler against the Whisperer Enterprise SBE Schema to generate compilable codec stubs and integrating the generated code with a higher level interface that supports the desired pricing and trading workflows.
Equivalent steps may be adopted for for C++ or .NET (as preferred).
The Whisperer Enterprise interface is founded on the Simple Binary Encoding (SBE) protocol which was commissioned by the CME in 2013, and has become the de facto successor to FIX / FAST.
Martin Thompson of Real Logic Ltd. describes the SBE reference implementation as “a compiler that takes a message schema as input and then generates language specific stubs. The stubs are used to directly encode and decode messages from buffers. The SBE tool can also generate a binary representation of the schema that can be used for the on-the-fly decoding of messages in a dynamic environment, such as for a log viewer or network sniffer.“
AS per the standard’s Technical Proposal, SBE is distinguished by these characteristics:
- A binary type system that maps FIX datatypes to native platform types, avoiding unnecessary and costly translation between character-based encodings and types directly usable by computers.
- Deterministic and narrowly targeted message layouts enforced by templates. They enable each use case of an overloaded FIX message type such as ExecutionReport to have its own layout.
- Each template contains just the required fields for its use case, such as immediate execution. The benefit is reduced message size and reduced optionality. In hardware terms, the result is reduced network bandwidth, reduced memory usage, reduction of cache misses, and less code branching in CPUs. All add up to deterministic performance and low latency. (In fact, “mechanical sympathy” enables hardware-based or accelerated solutions.)
- Just data on the wire. Metadata is exchanged out-of-band as a message schema. This enables pre-processing such as code generation of encoders and decoders rather on-the-fly interpretation.
- An explicit versioning mechanism that allows extension of templates over time without breaking older decoders.
The underpinning SBE schema definition also allows MarketFactory to offer a vanilla FIX protocol interface. This delivers identical session and application messages as those delivered via SBE, but delivered in FIX 5.0SP2 key=value| form over a standard fix protocol transport (FIXT.1.1).
- Existing client FIX engine and technology can be used with minimal effort, by coding against our Quickfix Data Dictionary.
- Use of both interfaces is supported, e.g. a Client may use the direct SBE interface for Market Data, whilst integrating via FIX for Orders.
https://github.com/FIXTradingCommunity/fix-simple-binary-encoding/wiki/Implementations – Lists reference codec implementations.
https://github.com/real-logic/simple-binary-encoding/wiki – the most widely adopted reference implementation (and used by MarketFactory), provides details of the SBE tool.
https://mechanical-sympathy.blogspot.com/ – Martin Thompson’s blog