npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fixparser-plugin-messagestore-kdb

v9.4.0

Published

FIXParser KDB+ Message Store Plugin

Readme

fixparser-plugin-messagestore-kdb

fixparser-plugin-messagestore-kdb is a FIXParser plugin designed for managing a message buffer in a KDB+ instance. It stores and retrieves FIX messages over a WebSocket connection to KDB+, providing an asynchronous interface for interacting with the data.

Features

  • WebSocket Connection: Connects to a KDB+ instance via WebSocket to send and receive messages.
  • Message Buffering: Stores messages in a configurable buffer, with an option to limit the buffer size.
  • FIX Message Parsing: Uses a provided FIX parser to serialize/deserialize FIX messages.
  • Asynchronous API: Supports asynchronous operations for adding, retrieving, and managing messages.

Installation

To install the dependencies, run:

npm install fixparser-plugin-messagestore-kdb

To setup KDB+, copy the files in kdb-files/ to the installation directory of KDB+, such as ~/q. Edit script.q to configure the listening port.

chmod +x ./kdb.sh
./kdb.sh

Usage

Creating a MessageStoreKDB Instance

import { FIXParser } from 'fixparser';
import { MessageStoreKDB } from 'fixparser-plugin-messagestore-kdb';

const fixParser = new FIXParser();
const store = new MessageStoreKDB({
    host: 'localhost',
    port: 1234,
    parser: fixParser,
    logger: fixParser.logger,
    onReady: () => {
        console.log('Connection to KDB+ established and ready.');
    }
});

fixParser.connect({
    host: 'localhost',
    port: 9878,
    protocol: 'tcp',
    sender: SENDER,
    target: TARGET,
    messageStoreIn: store,
    onOpen: () => {
        console.log('Connection established.');
    },
    onMessage: (message: Message) => console.log('received message', message.description, message.messageString),
    onClose: () => console.log('Disconnected'),
});

Adding a Message to the Buffer

const message = new Message(
    new Field(Fields.BeginString, ApplVerID.FIX42),
    new Field(Fields.MsgType, Messages.ExecutionReport),
    new Field(Fields.SenderCompID, 'ABC'),
    new Field(Fields.TargetCompID, 'XYZ'),
    new Field(Fields.MsgSeqNum, fixParser.getNextTargetMsgSeqNum()),
    new Field(Fields.ExecTransType, ExecTransType.New),
);
store.add(message)
    .then(() => console.log('Message added to the buffer.'));

Retrieving a Message by Sequence Number

store.getByMsgSequence(1)
    .then((message) => {
        if (message) {
            console.log('Retrieved message:', message);
        } else {
            console.log('Message not found.');
        }
    });

Getting the Buffer Size

store.size()
    .then((size) => {
        console.log('Current buffer size:', size);
    });

Clearing the Buffer

store.clear()
    .then(() => console.log('Buffer cleared.'));

Configuration Options

  • host (string): The hostname of the KDB+ instance.
  • port (number): The port on which the KDB+ instance is listening.
  • tableName (string, optional): The table name in the KDB+ instance (default: FIXParser).
  • parser (IFIXParser): The FIX parser used for encoding/decoding messages.
  • maxBufferSize (number, optional): The maximum size of the message buffer (default: 2500).
  • logger (Logger, optional): The logger for logging events and errors.
  • onReady (function): A callback function that is called when the KDB+ connection is ready.

License

This project is licensed under a Commercial License - see the LICENSE file for details.