
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
quickfix-js
Advanced tools
A complete Node.js FIX protocol engine library replicating QuickFIX/J functionality with session management, message parsing, and multi-version FIX support
A complete Node.js FIX protocol engine library that replicates QuickFIX/J functionality with session management, message parsing, and multi-version FIX support.
npm install quickfix-js
Or clone this repository:
git clone <repository-url>
cd quickfix-js
node examples/simple-test.js
import { SocketAcceptor } from 'quickfix-js';
import { Application } from 'quickfix-js';
import { SessionSettings } from 'quickfix-js';
import { FileStoreFactory } from 'quickfix-js';
import { ConsoleLogFactory } from 'quickfix-js';
class MyApplication extends Application {
onLogon(sessionID) {
console.log('Client logged on:', sessionID.toString());
}
fromApp(message, sessionID) {
console.log('Received:', message.getMsgType());
}
}
const settings = new SessionSettings('./acceptor.cfg');
const storeFactory = new FileStoreFactory();
const logFactory = new ConsoleLogFactory();
const application = new MyApplication();
const acceptor = new SocketAcceptor(application, storeFactory, settings, logFactory);
await acceptor.start();
import { SocketInitiator } from 'quickfix-js';
import { Application } from 'quickfix-js';
import { SessionSettings } from 'quickfix-js';
import { FileStoreFactory } from 'quickfix-js';
import { ConsoleLogFactory } from 'quickfix-js';
class MyApplication extends Application {
onLogon(sessionID) {
console.log('Logged on to server:', sessionID.toString());
}
fromApp(message, sessionID) {
console.log('Received:', message.getMsgType());
}
}
const settings = new SessionSettings('./initiator.cfg');
const storeFactory = new FileStoreFactory();
const logFactory = new ConsoleLogFactory();
const application = new MyApplication();
const initiator = new SocketInitiator(application, storeFactory, settings, logFactory);
await initiator.start();
QuickFIX-JS uses the same configuration format as QuickFIX/J:
[DEFAULT]
BeginString=FIX.4.2
FileStorePath=./store
FileLogPath=./logs
HeartBtInt=30
[SESSION]
ConnectionType=acceptor
SenderCompID=ACCEPTOR
TargetCompID=INITIATOR
SocketAcceptHost=0.0.0.0
SocketAcceptPort=5001
Common Settings:
BeginString: FIX version (FIX.4.0, FIX.4.2, FIX.4.4, FIX.5.0, FIXT.1.1)SenderCompID: Sender company IDTargetCompID: Target company IDHeartBtInt: Heartbeat interval in secondsFileStorePath: Path for message store filesFileLogPath: Path for log filesAcceptor Settings:
ConnectionType=acceptorSocketAcceptHost: Host to listen on (default: 0.0.0.0)SocketAcceptPort: Port to listen onInitiator Settings:
ConnectionType=initiatorSocketConnectHost: Host to connect toSocketConnectPort: Port to connect toReconnectInterval: Reconnection interval in secondsResetOnLogon: Reset sequence numbers on logon (Y/N)Represents a unique FIX session identifier.
import { SessionID } from 'quickfix-js';
const sessionID = new SessionID('FIX.4.2', 'SENDER', 'TARGET');
console.log(sessionID.toString()); // FIX.4.2:SENDER->TARGET
Represents a FIX message with header, body, and trailer.
import { Message } from 'quickfix-js';
const message = new Message();
message.setBeginString('FIX.4.2');
message.setMsgType('D'); // New Order Single
message.setSenderCompID('SENDER');
message.setTargetCompID('TARGET');
message.setField(11, 'ORDER123'); // ClOrdID
message.setField(55, 'AAPL'); // Symbol
message.setField(54, '1'); // Side (Buy)
message.setField(38, '100'); // OrderQty
Build raw FIX messages from Message objects.
import { MessageBuilder } from 'quickfix-js';
const builder = new MessageBuilder();
const rawMessage = builder.build(message);
console.log(rawMessage); // 8=FIX.4.2|9=...|...
Parse raw FIX messages into Message objects.
import { MessageParser } from 'quickfix-js';
const parser = new MessageParser();
const message = parser.parse(rawMessage);
console.log(message.getMsgType()); // D
Manages a single FIX session with state, sequence numbers, and protocol logic.
const session = new Session(sessionID, store, log, application, heartbeatInterval);
await session.initialize();
await session.logon();
await session.send(message);
await session.logout();
In-memory message storage (for testing).
import { MemoryStoreFactory } from 'quickfix-js';
const storeFactory = new MemoryStoreFactory();
Persistent file-based message storage.
import { FileStoreFactory } from 'quickfix-js';
const storeFactory = new FileStoreFactory('./store');
Logs to console output.
import { ConsoleLogFactory } from 'quickfix-js';
const logFactory = new ConsoleLogFactory();
Logs to file system.
import { FileLogFactory } from 'quickfix-js';
const logFactory = new FileLogFactory('./logs');
Extend the Application class to handle session events and messages:
import { Application } from 'quickfix-js';
class MyApplication extends Application {
onCreate(sessionID) {
// Called when session is created
}
onLogon(sessionID) {
// Called when logon is successful
}
onLogout(sessionID) {
// Called when logout occurs
}
toAdmin(message, sessionID) {
// Called before sending admin message
}
fromAdmin(message, sessionID) {
// Called when admin message is received
}
toApp(message, sessionID) {
// Called before sending application message
}
fromApp(message, sessionID) {
// Called when application message is received
}
}
0 - Heartbeat1 - Test Request2 - Resend Request4 - Sequence Reset5 - LogoutA - LogonD - New Order Singlenode examples/acceptor.js
node examples/initiator.js
Watch the FIX session establish with logon handshake and heartbeats!
import { Message } from 'quickfix-js';
// In your Application.onLogon callback:
onLogon(sessionID) {
const session = initiator.getSession(sessionID);
const order = new Message();
order.setBeginString(sessionID.getBeginString());
order.setMsgType('D'); // New Order Single
order.setSenderCompID(sessionID.getSenderCompID());
order.setTargetCompID(sessionID.getTargetCompID());
order.setField(11, `ORDER${Date.now()}`); // ClOrdID
order.setField(55, 'AAPL'); // Symbol
order.setField(54, '1'); // Side (Buy)
order.setField(38, '100'); // OrderQty
order.setField(40, '2'); // OrdType (Limit)
order.setField(44, '150.00'); // Price
session.send(order);
}
quickfix-js/
├── core/ # Core FIX primitives and engine
│ ├── Field.js
│ ├── FieldMap.js
│ ├── Group.js
│ ├── Message.js
│ ├── SessionID.js
│ ├── SessionSettings.js
│ ├── Session.js
│ ├── DataDictionary.js
│ ├── MessageParser.js
│ ├── MessageBuilder.js
│ └── Application.js
├── transport/ # Network I/O
│ ├── SocketAcceptor.js
│ └── SocketInitiator.js
├── store/ # Message persistence
│ ├── MessageStore.js
│ ├── MemoryStore.js
│ ├── FileStore.js
│ └── StoreFactory.js
├── logging/ # Logging system
│ ├── Log.js
│ ├── ConsoleLog.js
│ ├── FileLog.js
│ └── LogFactory.js
├── fix/ # FIX data dictionaries
│ └── data/
│ ├── FIX42.json
│ ├── FIX44.json
│ └── ...
└── examples/ # Usage examples
├── acceptor.js
├── initiator.js
└── simple-test.js
The library automatically manages sequence numbers for all messages. Sequence numbers are persisted in the message store.
The library automatically detects sequence gaps and sends ResendRequest messages to recover missing messages.
Automatic heartbeat messages are sent when no messages are exchanged. Test requests are sent when heartbeats are not received.
When a DataDictionary is loaded, messages are validated against the FIX specification including required fields and data types.
QuickFIX-JS follows a modular architecture similar to QuickFIX/J:
MIT
Contributions are welcome! Please submit pull requests or open issues.
FAQs
A complete Node.js FIX protocol engine library replicating QuickFIX/J functionality with session management, message parsing, and multi-version FIX support
The npm package quickfix-js receives a total of 3 weekly downloads. As such, quickfix-js popularity was classified as not popular.
We found that quickfix-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.