Skip to content

Introduction to the Reddio Java SDK

The Reddio Java SDK provides Java libraries to use Reddio API with Java async API.


The Reddio Java SDK has the following features:

  • The StarEx Cryptographic Library
  • Low-Level and High-Level Reddio API clients
  • Deposit, transfer, buy, sell, and withdraw assets
  • Interaction with Ethereum


Importing the Reddio Java SDK

Get the latest version on Maven Central Repository ( and import it into your project:

  • For Maven:
  • For Gradle:
    implementation 'com.reddio:reddio-api:VERSION'


Here is an example to write a script to query the user's balances with stark_key:

public void getBalances() throws ExecutionException, InterruptedException {
    DefaultReddioRestClient restClient = DefaultReddioRestClient.testnet();
    CompletableFuture<ResponseWrapper<GetBalancesResponse>> balancesFuture = restClient.getBalances(GetBalancesMessage.of(
    ResponseWrapper<GetBalancesResponse> result = balancesFuture.get();

Frequently used classes and methods

  • Low-Level API

    • ReddioRestClient: is the interface of Low-Level API for using Reddio API, you can find the corresponding methods for each REST API.
    • DefaultReddioRestClient: is the implementation of Low-Level REST API, and there are two factory methods for instantiating: DefaultReddioRestClient.mainnet() and DefaultReddioRestClient.testnet().
  • High-Level API

    • ReddioClient:
      • com.reddio.api.v1.ReddioClient is the interface for High-Level API. It encapsulates the complex and boring codes for signing the request with StarEx Cryptographic Library for easy-to-use purposes.
      • com.reddio.api.v1.ReddioClient.WithStarkExSigner is the interface for Ethereum interactions like deposit and withdrawal on Layer1. WithStarkExSigner can be spawned from ReddioClient with a private key.
    • DefaultReddioClient: The default implementations are com.reddio.api.v1.DefaultReddioClient and com.reddio.api.v1.DefaultReddioClient.DefaultWithStarkExSigner.

It is recommended to use High-Level API for a better experience.

  • CryptoService: com.reddio.crypto.CryptoService provides interactions with StarEx Cryptographic library, like signing and Public-key cryptography-related methods.