fast-protocol
fast-protocol is a javascript/node.js module providing encoder/decoder functions for FAST -> 'FIX Adapted for Streaming' protocol version 1.1.
Attention
Currently the module is still in development, see known limitations below.
Install
npm install fast-protocol
Features
- Load FAST xml template definition from file
- Provide FAST message encoding and decoding
Known limitations
- no 'streaming' support, only datagram or complete buffer can be encoded/decoded
- no templateRef support
- no individual operator support for decimal
- only 'global' dictionary
- limited error handling features implemented yet
Importing
var fastStream =
Simple Examples
Encoding
The following example shows simple encoding usage:
// load fast stream modulevar FastStream = // create encoder using FAST template definition from filevar encoder = 'emdi-7.0.xml' // encode messagevar buffer = encoder // process buffer...
Decoding - using single callback function
// load fast stream modulevar FastStream = // create message decodervar decoder = 'emdi-7.0.xml' // read binary buffer - user specific functionvar buffer = // decode buffer contentdecoder
Decoding - using message specific callback function
You can also provide a javascript object with message specific callback functions, like this example:
// load fast stream modulevar FastStream = // create message decodervar decoder = 'emdi-7.0.xml' // read binary buffer - user specific functionvar buffer = // decode buffer contentdecoder
Test coverage
Decode/Encode tests have been run using Xetra T7 EMDI market data of 03.01.2019; market data of the entire day has been decoded/encoded correctly - 100 % conformity achieved.
API Documentation
t.b.d.
Contributing
Everyone is welcome!