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

@xbbg/core

v1.5.1

Published

Independent Node.js client for Bloomberg-connected data workflows

Readme

npm version Node.js versions npm downloads per month CI Discord

Links: Documentation · API reference · GitHub · Changelog · LangGraph tools


@xbbg/core

Bloomberg data for Node.js, backed by the same Rust engine as the xbbg Python package. Requests and subscriptions run through a native N-API addon, with no HTTP hop, and return Apache Arrow tables or JSON rows.

Important: @xbbg/core is an independent open-source project. It is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P. or its affiliates. It does not provide Bloomberg access, credentials, entitlements, data rights, or SDK licenses; use your own under your Bloomberg agreements and policies.

Why @xbbg/core?

  • One engine for Python and Node. Both packages share the Rust request engine, response parsing, and typed errors, so requests behave the same in both.
  • Broad request coverage. BDP, BDS, BDH, intraday bars and ticks, BQL, BEQS, BSRCH, BQR, and YAS, plus recipes for futures, CDX, ETFs, dividends, indices, and fixed income.
  • Real-time built for many consumers. Subscriptions to the same security share one Bloomberg feed, latest() gives a current-value board, and delayed data or rejected fields raise warnings instead of failing silently.
  • Arrow-native results. Requests return Apache Arrow tables or JSON rows, and typed formats keep dates, times, and timestamps as typed columns.
  • Every Bloomberg connection mode. Desktop API (DAPI), B-PIPE/SAPI, ZFP, TLS, failover hosts, and SOCKS5.
  • TypeScript-first and prebuilt. Full type definitions and native addons for macOS arm64, Linux x64 (glibc 2.28+), and Windows x64.

Install

npm install @xbbg/core
# or
bun add @xbbg/core

@xbbg/core runs on Node.js 24+ and Bun 1.4+ servers, not in browsers. npm and Bun install the matching prebuilt addon automatically. You also need Bloomberg access (Terminal/DAPI, B-PIPE, SAPI, or ZFP) and Bloomberg's SDK runtime library on the same machine; on Windows, standard Terminal installs such as C:\blp\DAPI are found automatically.

Quickstart

import * as xbbg from '@xbbg/core';

xbbg.configure({ host: 'localhost', port: 8194 });

// Reference and historical data
const ref = await xbbg.blp.abdp(['AAPL US Equity', 'MSFT US Equity'], ['PX_LAST', 'SECURITY_NAME']);
const hist = await xbbg.blp.abdh(['SPX Index'], ['PX_LAST'], '2024-01-01', '2024-12-31');

// Intraday bars and ticks
const bars = await xbbg.blp.abdib('AAPL US Equity', '2024-12-02', 5);
const ticks = await xbbg.blp.abdtick(
  'AAPL US Equity',
  '2024-12-02T09:30:00',
  '2024-12-02T10:00:00',
);

// BQL and other requests on an engine
const engine = await xbbg.connect({ host: 'localhost', port: 8194 });
const bql = await engine.bql("get(px_last) for('AAPL US Equity')");

// Live data
const sub = await xbbg.blp.asubscribe(['AAPL US Equity'], ['LAST_PRICE', 'BID', 'ASK']);
try {
  for await (const tick of sub) {
    console.log(tick.topic, tick.get('LAST_PRICE'));
    break;
  }
} finally {
  await sub.unsubscribe();
}

Connections

configure() and connect() take the same config: host/port for a local Terminal, servers for ordered failover, auth (user, app, userapp, dir, manual, or token), tls, zfpRemote for ZFP leased lines, and socks5.

const bpipe = await xbbg.connect({
  servers: [
    { host: 'bpipe-primary.example.com', port: 8194 },
    { host: 'bpipe-secondary.example.com', port: 8196 },
  ],
  auth: { method: 'userapp', appName: 'my-bpipe-app' },
  tls: { clientCredentials: '/secure/client.p12', trustMaterial: '/secure/trust.p7' },
});

Subscriptions

// A board you poll: rows: false keeps current values without queuing ticks
const board = await engine.subscribe(
  ['IBM US Equity', 'MSFT US Equity'],
  ['BID', 'ASK', 'LAST_PRICE'],
  {
    rows: false,
  },
);
try {
  console.log(board.latest({ backend: 'json' })); // one row per security
} finally {
  await board.unsubscribe();
}
  • Subscriptions to the same security within one engine share a Bloomberg feed; addFields() grows it with a single re-subscribe.
  • onDelayed and onFieldError choose whether delayed data and fields Bloomberg rejects warn (through process.emitWarning), raise, or are only recorded.
  • Iterate scalar ticks or call sub.arrow() for Apache Arrow tables. Row subscriptions end with BlpSubscriptionDataLossError on data loss; rows: false boards re-subscribe automatically.

Exchange auctions and imbalance

Bloomberg publishes imbalance and auction data only on the listing where the auction runs. These helpers route each ticker or ISIN to that venue and check Bloomberg's answer before returning data.

import { AuctionFields } from '@xbbg/core';

// SPY US Equity -> SPY UP Equity, IBM US Equity -> IBM UN Equity
const venues = await engine.resolveVenues(['SPY US Equity', 'IBM US Equity']);
const snapshot = await engine.auctionSnapshot(['SPY US Equity'], {
  fields: AuctionFields.imbalance,
});
const auction = await engine.subscribeAuction(['SPY US Equity', 'IBM US Equity'], { rows: false });

Recipes

Recipes wrap common Bloomberg workflows and return an Arrow table, or JSON rows with backend: 'json': futures (futTicker, activeFutures, futuresCurve), CDX (cdxTicker, activeCdx), fixed income (yas, bqr, preferreds, corporateBonds), equities and ETFs (indexMembers, etfHoldings, etfNavHistory, dividend, turnover), identifiers (resolveIsins, issuerIsins), FX (currencyConversion), and volatility surfaces (volSurface).

const curve = await engine.futuresCurve('ES1 Index', { maxContracts: 6 });
const members = await engine.indexMembers('SPX Index', { asof: '20240102' });

Pass returnEids: true to bdp, bds, bdh, bdib, or bdtick to get Bloomberg entitlement IDs, then check them with engine.checkEntitlements('//blp/refdata', eids).

More

  • API reference: date inputs, typed results, subscription lifecycle and options, warnings, every recipe, engine configuration, and local development.
  • @xbbg/langgraph: LangChain and LangGraph tools built on @xbbg/core.
  • xbbg for Python and the Rust crates use the same engine.
  • Releases are published from GitHub Actions with npm trusted publishing and provenance.

License

Apache-2.0