Engine
Direct engine class with new Engine(host, port) and Engine.withConfig(config).
Node.js API surface
@xbbg/core.This page maps the public Node.js package surface from js-xbbg/src/index.ts and js-xbbg/src/types.ts so the docs track the package published on npm.
EngineDirect engine class with new Engine(host, port) and Engine.withConfig(config).
connect / configureTop-level connection helpers for process-wide usage.
EngineConfigHost/port, ordered servers, ZFP, TLS, SOCKS5, auth, retry, worker pools, stream tuning, validation, field cache, keepalive, slow-consumer watermarks, SDK logging.
The npm package loads a platform native addon through optional @xbbg/core-* packages.
Backend.ARROWBackend.JSONBackend.POLARSFormat.LONGFormat.LONG_TYPEDFormat.LONG_WITH_METADATAFormat.SEMI_LONGformatDateformatDateTimeversionsetLogLevelgetLogLevelError exports include BlpError, BlpSessionError, BlpRequestError, BlpValidationError, BlpTimeoutError, BlpInternalError, and wrapError.
| Family | Helpers |
|---|---|
| Reference / historical / bulk | bdp, abdp, bdh, abdh, bds, abds |
| Intraday | bdib, abdib, bdtick, abdtick |
| Subscriptions | subscribe, asubscribe, Subscription, Tick, ArrowSubscription |
| Namespaces | blp, ext |
The top-level helpers use the configured engine. They are convenient for services that want one process-level runtime.
Engine exposes the full request and operational surface:
| Area | Methods |
|---|---|
| Generic execution | request, requestRaw |
| Core Bloomberg workflows | bdp, bds, bdh, bdib, bdtick, bql, beqs, bsrch, bta, bflds, blkp, bport, bcurves, bgovts |
| Field metadata | resolveFieldTypes, getFieldInfo, clearFieldCache, saveFieldCache, validateFields, isFieldValidationEnabled |
| Schema introspection | getSchema, getOperation, listOperations, getCachedSchema, invalidateSchema, clearSchemaCache, listCachedSchemas, getEnumValues, listValidElements, bops, bschema |
| Streaming services | subscribe, subscribeWithOptions, stream, vwap, mktbar, depth, chains |
| Lifecycle | signalShutdown, isAvailable |
| Area | Methods |
|---|---|
| Fixed income | bqr, yas, preferreds, corporateBonds |
| Futures / CDX resolution | futTicker, activeFutures, cdxTicker, activeCdx |
| Historical / holdings | dividend, turnover, etfHoldings |
| Currency | currencyConversion |
blp namespace The blp namespace exposes the common Bloomberg request helpers in an object shape:
import { blp } from '@xbbg/core';
const snapshot = await blp.abdp(['AAPL US Equity'], ['PX_LAST']);
const history = await blp.abdh(['AAPL US Equity'], ['PX_LAST'], '2024-01-01', '2024-01-31');
const sub = await blp.asubscribe(['AAPL US Equity'], ['LAST_PRICE']);Current blp keys include bdp, bdh, bds, bdib, bdtick, subscribe, abdp, abdh, abds, abdib, abdtick, and asubscribe.
ext namespace The ext namespace exposes lower-level helpers and native utility functions for recipes and market metadata:
ext.cdx.acdx_info, ext.cdx.acdx_pricing, ext.cdx.acdx_riskparseDate, fmtDate, pivotToWide, isLongFormatparseTicker, buildFuturesTicker, generateFuturesCandidates, validateGenericTicker, filterValidContractsparseCdxTicker, previousCdxSeries, cdxGenToSpecificbuildFxPair, sameCurrency, currenciesNeedingConversionrenameDividendColumns, renameEtfColumns, getDvdTypes, getDvdCols, getEtfColsbuildYasOverrides, buildPreferredsQuery, buildCorporateBondsQueryderiveSessions, getMarketRule, inferTimezone, exchange override helpers, sessionTimesToUtcThe package exports typed inputs for every public surface, including DateLike, DateTimeLike, EngineConfig, RequestInput, StreamOptions, BdpOptions, BdhOptions, BdibOptions, BdtickOptions, BqlOptions, BeqsOptions, BsrchOptions, BtaOptions, BfldsOptions, BqrOptions, YasOptions, PreferredsOptions, CorporateBondsOptions, FuturesResolveOptions, ActiveCdxOptions, DividendOptions, TurnoverOptions, EtfHoldingsOptions, RetryPolicy, TlsConfig, Socks5Config, and result metadata interfaces such as SubscriptionStats, FieldInfo, ExchangeInfoResult, and SessionWindowsInfo.
Backend.ARROW returns Apache Arrow tables.Backend.JSON returns JavaScript-friendly objects.Backend.POLARS requires the optional nodejs-polars peer dependency.DateLike accepts Date, ISO/Bloomberg-native strings, epoch milliseconds, or duck-typed Luxon DateTime values with toJSDate().