We're excited to announce the public release of the Java version of CCXT, starting from version 4.5.56 🎉
The API is designed to stay consistent with the other CCXT languages, while Java provides both synchronous and asynchronous versions of each unified method. For example:
-
createOrder-
createOrderAsyncJava 21 or higher is required to build or consume the package
The package is available on Maven Central: https://central.sonatype.com/artifact/io.github.ccxt/ccxt
Install/Import
dependencies {
implementation("io.github.ccxt:ccxt:4.5.56")
}Examples
var exchange = new Binance();
exchange.apiKey = "your api key";
exchange.secret = "your secret";
var params = new HashMap<String, Object>();
// Sync Version
var order = exchange.createOrder("ETH/USDT", "market", "buy", 500.0, null, params);
// Async version
var orderAsync = exchange.createOrderAsync("ETH/USDT", "market", "buy", 500.0, null, params).get();
You can check some examples here: https://github.com/ccxt/ccxt/tree/master/java/examples
Thank you for using CCXT!
Yours, the CCXT Dev Team.