Skip to content

Java 8+ and Java 17+

io.github.underloam:xbbg brings the xbbg engine to the JVM.

The same Rust request engine, response parsing, recipes, and shared-feed subscriptions as the Python and Node.js packages, loaded in-process through JNI. Requests return columnar tables, row maps, Arrow IPC bytes, or Arrow Java vectors; subscriptions yield sparse ticks, Arrow batches, or gap-aware deliveries.

Packages ​

ArtifactJavaRole
io.github.underloam:xbbg8+Full Bloomberg request, recipe, extension, SDK provisioning, and subscription API. Bundles JNI native libraries for Windows x64, Linux x64 (glibc 2.28+), and macOS arm64 with zero runtime dependencies.
io.github.underloam:xbbg-jdk1717+Optional add-on: java.util.concurrent.Flow publishers, sealed types and records for exhaustive pattern matching, Apache Arrow Java VectorSchemaRoot interop, and virtual-thread callback support.

What you get ​

Bundled JNI natives, zero dependencies

io.github.underloam:xbbg targets Java 8 bytecode, has no third-party runtime dependencies, and bundles native libraries for Windows x64, Linux x64 (glibc 2.28+), and macOS arm64.

One engine with Python and Node.js

Shares the Rust request engine, Arrow extractors, request sharding, field-type cache, and error classification with xbbg for Python and @xbbg/core for Node.js.

Broad request and recipe coverage

BDP, BDS, BDH, intraday bars and ticks, BQL, BEQS, BSRCH, BTA, BQR, YAS, field and schema introspection, plus recipes for futures, CDX, ETFs, dividends, indices, identifiers, auctions, and delayed data.

Real-time for many consumers

Subscriptions to the same security share one Bloomberg feed per engine. latest() serves a current-value board, delivery(SubscriptionDeliveryMode.STATE) streams conflated current images, and XbbgFlow adapts streams to Flow.Publisher.

Columnar tables and Arrow interop

Results arrive as a lazy columnar Table by default, row maps with Backend.ROWS, Arrow IPC bytes, or Apache Arrow Java VectorSchemaRoots via ArrowBackends in xbbg-jdk17.

Virtual-thread friendly

Every Bloomberg call returns a CompletableFuture completed from native worker threads without blocking inside a JNI frame, so waiting with Xbbg.await(future) on virtual threads never pins carrier threads.

Requirements ​

  • Java 8 or newer for io.github.underloam:xbbg; Java 17 or newer for io.github.underloam:xbbg-jdk17 (pattern-matching switch and virtual threads use Java 21+).
  • Windows x64, Linux x64 (glibc 2.28+), or macOS arm64 (Apple Silicon).
  • Bloomberg access (Desktop API, B-PIPE, SAPI, or ZFP) and the Bloomberg C++ SDK runtime library (blpapi3_64.dll or libblpapi3_64.so), discovered locally or provisioned into the xbbg cache.
  • xbbg is independent open-source software. It is not affiliated with Bloomberg and provides no Bloomberg access, credentials, entitlements, or data rights.

Quick example ​

java
import io.github.underloam.xbbg.BdhOptions;
import io.github.underloam.xbbg.Blp;
import io.github.underloam.xbbg.EngineConfig;
import io.github.underloam.xbbg.KeyColumn;
import io.github.underloam.xbbg.Xbbg;
import io.github.underloam.xbbg.table.Column;
import io.github.underloam.xbbg.table.Row;
import io.github.underloam.xbbg.table.Table;
import java.time.LocalDate;
import java.util.Arrays;

public class Example {
  public static void main(String[] args) {
    Xbbg.configure(
        EngineConfig.builder()
            .host("localhost")
            .port(8194)
            .keyColumn(KeyColumn.SECURITY)
            .build());

    Table ref =
        Xbbg.await(
            Blp.bdp(
                Arrays.asList("AAPL US Equity", "MSFT US Equity"),
                Arrays.asList("PX_LAST", "SECURITY_NAME")));
    for (Row row : ref) {
      System.out.println(
          row.getString("security")
              + " "
              + row.getString("field")
              + " = "
              + row.get("value"));
    }

    Table hist =
        Xbbg.await(
            Blp.bdh(
                "SPX Index",
                "PX_LAST",
                BdhOptions.builder()
                    .start(LocalDate.of(2024, 1, 1))
                    .end(LocalDate.of(2024, 12, 31))
                    .build()));
    Column dates = hist.column("date");
    System.out.println(dates.getLocalDate(0) + " .. " + dates.getLocalDate(hist.numRows() - 1));
  }
}

API families ​

Package / ClassRole
io.github.underloam.xbbg.XbbgLibrary versions, native logging (setLogLevel), runtime discovery (setSdkPath, setSdkSource), shared engine configuration (configure, engine, connect), callback executor (setCallbackExecutor), and Xbbg.await(future).
io.github.underloam.xbbg.BlpStatic helpers on the configured shared engine: bdp, bdh, bds, bdib, bdtick, delayStatus, subscribe, stream, vwap, mktbar, depth, chains, subscribeWithOptions, subscribeAuction, streamAuction, and subscribeEtfInav.
io.github.underloam.xbbg.EngineIndependent, AutoCloseable engine (Engine.connect, Engine.open) with all Blp methods plus bql, beqs, bsrch, bta, bflds, fieldInfo, fieldSearch, blkp, bport, bcurves, bgovts, generic request/requestRaw/requestIpcFile, schema and field caches, entitlements, and all analytics recipes.
io.github.underloam.xbbg.table.*Table, Column, Row, RowsResult, DataType, ResultMetadata, ResultMetadataView, DelayedDataInfo, BloombergMetadataError, BloombergFieldException, and BloombergFieldError.
io.github.underloam.xbbg.subscription.*Subscription, ArrowSubscription, DeliveryStream, Tick, FieldHandle, StreamOptions, AuctionStreamOptions, SubscriptionDelivery, SubscriptionGap, and diagnostic status snapshots.
io.github.underloam.xbbg.ext.*Synchronous native utilities in Ext, auction field groups and imbalance side parser in AuctionFields, and shared-engine CDX helpers in Cdx.
io.github.underloam.xbbg.sdk.*Bloomberg runtime provisioning and cache inspection: BlpapiSdk, BlpapiSource, ProvisionOptions, and ProvisionResult.
io.github.underloam.xbbg.jdk17.*Java 17+ add-on: XbbgFlow, DeliveryView, TickValue, TickValues, Errors, ErrorKind, ArrowBackends, ArrowTables, and VirtualThreads.

Runtime model ​

  1. 01Configure or open an Engine

    Xbbg.configure() sets defaults for the static Blp facade; Engine.connect() and Engine.open() create an independent AutoCloseable engine.

  2. 02Request, stream, or run a recipe

    Every network call returns a CompletableFuture backed by the Rust engine's worker pool or subscription sessions. Use Xbbg.await(future) for synchronous code or compose stages asynchronously.

  3. 03Consume typed output

    Read columns and rows from Table, inspect ResultMetadata, or convert to Arrow Java VectorSchemaRoots, and handle failures through unchecked BlpException subclasses.

Next steps ​

Installation

Maven and Gradle coordinates, JDK 24+ native access flags, and Bloomberg C++ SDK runtime discovery or provisioning.

Quickstart

Static Blp helpers versus Engine, reference, historical, intraday, BQL, subscriptions, and Java 17+ helpers.

Configuration

Every EngineConfig builder field: transports, failover, B-PIPE/SAPI auth, TLS, ZFP, SOCKS5, pools, timeouts, and logging.

Output Formats

Table, Column, RowsResult, Arrow IPC, ArrowTables / ArrowBackends, result metadata, and dates.

Streaming

Subscription, sparse ticks, latest() boards, gap-aware deliveries(), XbbgFlow, and VirtualThreads.

Recipes

Fixed income, futures, CDX, ETFs, dividends, volatility surfaces, auctions, entitlements, and Ext helpers.

API Surface

Complete class, interface, enum, and method inventory for xbbg and xbbg-jdk17.

MCP Server

Use the xbbg MCP server when an agent or host needs the Model Context Protocol.

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.