Skip to content

npm package for easy accessible FIX Repository information

License

Notifications You must be signed in to change notification settings

Itiviti/fix-repo

Repository files navigation

fix-repo

npm version Build Status codecov

npm package for easy accessible FIX Repository information, without parsing the xml repository

Installation

To install the package, simply run the following

npm install fix-repo

Usage

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);

To Build

Run the following command

npm install -g gulp-cli
npm install

gulp

License

Apache-2.0