Skip to content

Error: FixAcceptor requires an options parameter #47

Description

@milsanore

Hi,
Thanks for the library, I'm just getting started with it. I'm getting the following error:

Error: FixAcceptor requires an options parameter
at Error (native)
at new Gateway

And this is my source:

// @flow

const quickfix = require('node-quickfix');

const FIX_CFG = "./fix.cfg";

class Gateway
{
	fixAcceptor: 	quickfix.acceptor;
	logonProvider: 	quickfix.logonProvider;

	constructor()
	{
		this.logonProvider = new quickfix.logonProvider(function(logonResponse, msg, sessionId) {
			if(msg.tags[553] == 'USERNAME' && msg.tags[554] == 'PASSWORD')
				logonResponse.done(true); //SUCCESSFUL LOGON
			else
				logonResponse.done(false); //REJECT LOGON
		});

		this.fixAcceptor = new quickfix.acceptor({
			propertiesFile: FIX_CFG,
			logonProvider: this.logonProvider
		});
	}
}

module.exports = Gateway;

I built it based on the code samples in the project README.md but it does not seem to work. Any advice is welcome.

Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions