logotype / fixparser Goto Github PK
View Code? Open in Web Editor NEWFIX5.0SP2 parser.
FIX5.0SP2 parser.
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.
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.
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 ?
If we parse a fix string which is already separated with \x01
characters FIXParser.js#L26 incorrectly replaces these with additional \x01
characters which then result in items with tag NaN. It would be preferable to make the split character an optional argument to FIXParser#parse and not perform this replacement.
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?
How can I send messages for FIX.4.3 version?
My server understands FIX.4.3 and trying to use fixparser for the client, but fixparser layer is always populating BeginString field to FIX.4.2.
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.
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?
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
Messages using the latest FIX spec have a header with tag 8 = FIXT.1.1 which results in firstSeparator
set to 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.