npm package for easy accessible FIX Repository information, without parsing the xml repository
To install the package, simply run the following
npm install fix-repo
To get information for 35=D
in FIX 5.0
:
import { Fix50 } from 'fix-repo';
const msgTypeField = Fix50.getField('35');
const msgTypeCodeSet = msgTypeField.codeSet;
const code = msgTypeCodeSet.codes['D']; // code.name === 'NewOrderSingle'
To get message type info in FIX 4.4
:
import { Fix44 } from 'fix-repo';
function structureConsumer(structure: Structure) {
const structureType = structure.type;
if (structureType instanceof Group) {
// num tag of the Repeating Group
const numTag = structureType.numInGroupId;
// Could consume the repeating group's structures by recursion
structureType.structures.forEach(s => structureConsumer(s));
} else if (structureType instanceof Field) {
// structureType is Field
} else if (structureType instanceof Component) {
// Could consume the component's structures by recursion
structureType.structures.forEach(s => structureConsumer(s));
}
}
const msgType = Fix44.getMessage('D');
msgType.structures.forEach(structure => structureConsumer);
Run the following command
npm install -g gulp-cli
npm install
gulp
Apache-2.0