Skip to content

xbbg 1.1.1

Choose a tag to compare

@github-actions github-actions released this 20 Apr 09:43
· 193 commits to main since this release

Added

  • @xbbg/core: recipe helpers exposed on the JS Engine: Eleven recipe methods surfaced through the NAPI bindings — yas, preferreds, corporateBonds, futTicker, activeFutures, cdxTicker, activeCdx, dividend, turnover, etfHoldings, currencyConversion — wrapping the corresponding xbbg_recipes entry points. Returns Arrow Table by default with Backend.JSON / Backend.POLARS opt-in via options.backend; errors route through the standard BlpError hierarchy. Ships with TypeScript definitions (YasOptions, PreferredsOptions, CorporateBondsOptions, FuturesResolveOptions, ActiveCdxOptions, DividendOptions, TurnoverOptions, EtfHoldingsOptions, RecipeBackendOptions), README usage examples, and smoke-test coverage in js-xbbg/test.js.
  • Prebuilt cross-platform offline bundles for @xbbg/core (scripts/build-offline-bundle.js): Packages @xbbg/core plus the prebuilt @xbbg/core-<label> native addon into a hoisted bundle/node_modules tree alongside source tarballs for air-gapped installs. js_github_release.yml gains a pack-offline-bundles job that attaches xbbg-offline-<label>-<version>.zip to the GitHub release (covered by the existing validate-release-payload scanner for Bloomberg SDK leakage); ci-rust.yml mirrors the job per-commit with a 7-day artifact retention for downstream consumers.

Changed

  • EngineConfig.request_timeout_ms default changed from 60_000 to 0 (disabled): The previous 60s hard cap was self-inflicting timeouts on legitimately long requests — e.g. a full-day bdtick for a liquid future routinely exceeds 60s on the Bloomberg side, so the worker was cancelling healthy requests and surfacing a BlpTimeoutError to the caller. The enforcement machinery is unchanged; callers who want a hard upper bound must now opt in explicitly by passing request_timeout_ms=<ms> (Python), requestTimeoutMs (NAPI), or PyEngineConfig.request_timeout_ms (pyo3).

Fixed

  • bdtick / bdib silently dropped overrides= kwargs (#295): _build_abdtick_plan and _build_abdib_plan in py-xbbg/src/xbbg/blp.py were doing elements, _ = await _aroute_kwargs(...) — the _ threw away the overrides list before the request reached the Rust engine. Other endpoints (bdp/bdh/bds/beqs/bport) capture both; only the two intraday builders discarded overrides. Now forwarded. Note that Bloomberg's IntradayTickRequest / IntradayBarRequest schemas have no overrides sub-element, so forwarded overrides now surface as a Bloomberg element-not-found error instead of being silently no-oped; for response-size limits use the top-level maxDataPoints kwarg instead.

  • bdib + maxDataPoints fell back to the generic flattener, losing the typed schema: crates/xbbg-async/src/engine/worker.rs routed intraday-bar / tick requests through GenericState whenever any user-supplied element was set, on the assumption that extra elements imply extra response columns. That holds for tick include* flags (condition codes, exchange codes, etc. which add per-tick columns), but not for behavior-only elements like maxDataPoints, maxDataPointsOrigin, gapFillInitialBar, or adjustment* — those don't change the response shape. Consequence: blp.bdib(..., maxDataPoints=1) returned [path, type, value_str, value_num] instead of the typed [ticker, time, open, high, low, close, volume, numEvents], and blp.bdtick(..., maxDataPoints=1) returned 6 rows instead of 1 (the generic extractor exploded one tick into per-field rows). Fallback removed entirely for IntradayBar (no column-adding elements exist on IntradayBarRequest); narrowed to include* keys on IntradayTick.

  • Offline-bundle packing rejected by npm with EBADPLATFORM: npm install in the pack-offline-bundles job runs on a Linux runner but pulls in @xbbg/core-<label> packages that declare os/cpu for their target platform (e.g. win32/x64). scripts/build-offline-bundle.js now passes --force so the cross-platform install succeeds; the bundle is never executed on the install host, so the platform check is safe to skip.

  • bdp / bdh silently returned long-shape output for format='semi_long' (#296, #299): crates/xbbg-async/src/engine/worker.rs had no "semi_long" arm in its format-string match — the RefData branch hardcoded OutputFormat::Long and only varied LongMode; the HistData branch only recognised "wide". So blp.bdp(..., format='semi_long') returned [ticker, field, value] instead of the documented [ticker, <field1>, <field2>, …] pivoted shape, and blp.bdh(..., format='semi_long') returned [ticker, date, field, value] instead of [ticker, date, <field1>, …]. The Format::SemiLong enum in services.rs parsed "semi_long" round-trip correctly; the break was purely in the worker routing. Fixed by mapping "semi_long" | "wide"OutputFormat::Wide in both arms. Regression coverage: new TestOutputFormats class in py-xbbg/tests/live/test_api.py asserts column shape for all four Format variants (long, semi_long, long_typed, long_metadata) on both bdp and bdh, verified live against Bloomberg.

Full Changelog: v1.1.0...v1.1.1