0.1.1 • Published 3 years ago

@sbx-tools/fix-quote-source v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

FIX quote source

What's this

Standard FIX quote source interface and dummy implementation

How to use it

Install package

npm i @sbx-tools/fix-quote-source

Import and use it

const Connection = require('@sbx-tools/fix-quote-source');
const conn = new Connection({host: 'a', port: 1234, targetCompID: 'b', senderCompID: 'c', userPassword: 'd'});

conn.connect().then(async () => {
    const syms = await conn.getSymbols();
    const quotes = await conn.quotesSubscribe(syms);

    for await (let quote of quotes) {
        console.log(quote);
    }

    // or

    quotes.on('data', (quote) => {
        console.log(quote);
    })
});