Skip to main content

Universalis Java

Universalis Java is a Java client for Universalis, the crowd-sourced market board data of Final Fantasy XIV. It gives you:

The API coverage page lists which parts of the Universalis API the client wraps.

Requirements​

WhatVersion
Java21 or newer. The library is compiled for Java 21.
SLF4JThe library logs through slf4j-api and brings it. Add an SLF4J binding (for example slf4j-simple or Logback) to see the log output.

Modules​

ModuleWhat it does
universalis-restThe REST client.
universalis-wsThe WebSocket client.
universalis-coreWorlds, item names and the shared data types. Both clients bring it.
universalisBoth clients in one artifact.

Add the dependency​

Universalis Java is published to EldoNexus. Releases are in maven-releases, builds of the main branch in maven-snapshots. The maven-public repository holds both.

repositories {
maven("https://eldonexus.de/repository/maven-public/")
}

dependencies {
implementation("de.chojo.universalis:universalis:2.1.0")
}

Only need one client? Use universalis-rest or universalis-ws as the artifact instead.

Quick start​

Ask for the cheapest high quality listing of an item in a data center:

try (UniversalisRest rest = UniversalisRest.defaultApi()) {
MarketBoardResponse response = rest.marketBoard()
.dataCenter(Worlds.europe().light())
.itemsIds(36113)
.highQuality()
.complete();
System.out.println("Cheapest HQ price: " + response.minPrice().highQuality());
}

Listen to new sales on one world:

UniversalisWs ws = UniversalisWs.getDefault()
.subscribe(Subscriptions.salesAdd().restrict(Worlds.europe().light().odin))
.registerListener(new ListenerAdapter() {
@Override
public void onSalesAdd(SalesAddEvent event) {
System.out.println(event.sales().size() + " sales of item " + event.item().id());
}
})
.build();