fix-repo
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

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

Package Sidebar

Install

npm i fix-repo

Weekly Downloads

0

Version

0.4.0

License

Apache-2.0

Unpacked Size

5.01 MB

Total Files

50

Last publish

Collaborators

  • ngyukman