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.
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.
| Artifact | Java | Role |
|---|---|---|
io.github.underloam:xbbg | 8+ | 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-jdk17 | 17+ | 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. |
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.
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.
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.
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.
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.
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.
io.github.underloam:xbbg; Java 17 or newer for io.github.underloam:xbbg-jdk17 (pattern-matching switch and virtual threads use Java 21+).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.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));
}
}| Package / Class | Role |
|---|---|
io.github.underloam.xbbg.Xbbg | Library 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.Blp | Static 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.Engine | Independent, 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. |
Xbbg.configure() sets defaults for the static Blp facade; Engine.connect() and Engine.open() create an independent AutoCloseable engine.
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.
Read columns and rows from Table, inspect ResultMetadata, or convert to Arrow Java VectorSchemaRoots, and handle failures through unchecked BlpException subclasses.
Maven and Gradle coordinates, JDK 24+ native access flags, and Bloomberg C++ SDK runtime discovery or provisioning.
Static Blp helpers versus Engine, reference, historical, intraday, BQL, subscriptions, and Java 17+ helpers.
Every EngineConfig builder field: transports, failover, B-PIPE/SAPI auth, TLS, ZFP, SOCKS5, pools, timeouts, and logging.
Table, Column, RowsResult, Arrow IPC, ArrowTables / ArrowBackends, result metadata, and dates.
Subscription, sparse ticks, latest() boards, gap-aware deliveries(), XbbgFlow, and VirtualThreads.
Fixed income, futures, CDX, ETFs, dividends, volatility surfaces, auctions, entitlements, and Ext helpers.
Complete class, interface, enum, and method inventory for xbbg and xbbg-jdk17.
Use the xbbg MCP server when an agent or host needs the Model Context Protocol.