GithubHelp home page GithubHelp logo

fixparser's Introduction

fixparser's People

Contributors

dgt79 avatar dusanminic avatar jonfreedman avatar logotype avatar sami-sweng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fixparser's Issues

connect function is mis-specified

The connect() function in the FIXParser class doesn't work. It does not properly pass the values to the object instance. (src/FIXParser.js).

The issue seems to be the parameters is misspecified. Currently, the parameter is being evaluated to a blank object.

image

This:
connect({ host = 'localhost', port = '9878', sender = 'SENDER', target = 'TARGET', heartbeatIntervalMs = 60000, fixVersion = this.fixVersion } = {}) {

Probably should be this:
connect({ host = 'localhost', port = '9878', sender = 'SENDER', target = 'TARGET', heartbeatIntervalMs = 60000, fixVersion = this.fixVersion }) {

Or better yet support an object passed in with the various options. Options not included are defaulted.

Thanks.

FIX API is not able to connect

Hello,
Using Fixparser,I want to implement FIX API.
I was trying to connect with "Logon". Its sending message but no any response. How can i sure that response comes or not ?
Can you please help to resolve this ?

Checksum is not valid

Good day, we are having trouble producing a heartbeat and connecting to the FIX Server. We have an issue with validating the Checksum. Below is our setup:

const  heartbeat = fixParser.createMessage(
  new Field(Fields.BeginString, config.FIXVERSION),
  new Field(Fields.MsgType, Messages.Heartbeat),
  new Field(Fields.MsgSeqNum, fixParser.getNextTargetMsgSeqNum()),
  new Field(Fields.SenderCompID, config.SENDER),
  new Field(Fields.SendingTime, fixParser.getTimestamp()),
  new Field(Fields.TargetCompID, config.TARGET),
);

const messages = fixParser.parse(heartbeat.encode('|'));
console.log(messages);

Result:

[ e {
    fixVersion: undefined,
    data: [ [e], [e], [e], [e], [e], [e], [e], [e] ],
    string:
     '8=FIX.4.4\u00019=63\u000135=0\u000134=1\u000149=fxpro.8143712\u000152=20190504-05:49:29.686\u000156=CSERVER\u000110=041\u0001',
    description: 'Heartbeat',
    messageType: '0',
    messageContents: [ [Object], [Object], [Object] ],
    bodyLengthValid: true,
    checksumValid: false,
    checksumValue: '041',
    checksumExpected: '204',
    bodyLengthValue: 63,
    bodyLengthExpected: 63 } ]

How can we produce a message that is valid? Are we doing something wrong or missing some configurations?

FIXParser constructor takes approx 8 seconds

When creating a new FIXParser instance, the constructor takes approximately 8 seconds to complete.

console.log("start", new Date());
const FIXParser = require('fixparser');
console.log("create", new Date());
const fixParser = new FIXParser.default();
console.log("parse", new Date());
console.log(fixParser.parse('8=FIX.4.2|9=51|35=0|34=703|49=ABC|52=20100130-10:53:40.830|56=XYZ|10=249|'));
console.log("done", new Date());

produces the following output:

start 2018-06-27T08:52:48.148Z
create 2018-06-27T08:52:48.298Z
parse 2018-06-27T08:52:56.348Z
[ A {
    fixVersion: undefined,
    data:
     [ [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object] ],
    string: '8=FIX.4.2\u00019=51\u000135=0\u000134=703\u000149=ABC\u000152=20100130-10:53:40.830\u000156=XYZ\u000110=249\u0001',    description: 'Heartbeat',
    messageType: '0',
    messageContents: [ [Object], [Object], [Object] ],
    bodyLengthValid: true,
    checksumValid: true,
    checksumValue: '249',
    checksumExpected: '249',
    bodyLengthValue: 51,
    bodyLengthExpected: 51 } ]
done 2018-06-27T08:52:56.348Z

This seems like a long time. we are using the parser in web workers so this introduces a long delay when starting a worker up.

I'll try and do some more investigation and post additional info here should I discover the cause.

Add TypeScript definitions

For starters, thanks for the fantastic library. I'm currently using it in a TypeScript project and having a TypeScript definition file would go a long way to make it even more useful. I've coded one up for my personal use but could merge it in here if you were interested. Thoughts?

FIXParser is not a constructor

Hello, I'm getting FIXParser is not a constructor with the following code:

const FIXParser = require('fixparser');
const fixParser = new FIXParser();

Node v9.10.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.