This guide explains how to install the prerequisites, set up the SDK in IntelliJ IDEA, and configure your first project.
Before you start, make sure the following tools are installed:
Version: Java 8 or higher (LTS versions recommended).
Verify installation:
java -versionVerify installation:
mvn -versionVerify installation:
git --versionClone the official Unified Odds SDK example project from GitHub:
git clone https://github.com/sportradar/UnifiedOddsSdkJava.git
cd UnifiedOddsSdkJavaπ‘ If you prefer, you can also download the project as a ZIP and extract it.
pom.xml file inside the cloned repository.IntelliJ will automatically import dependencies and set up the project.
This forces IntelliJ to re-import the pom.xml, download any new dependencies, and update the project structure accordingly.
The SDK version is controlled in the pom.xml file. To use a specific version:
<dependency>
<groupId>com.sportradar</groupId>
<artifactId>unifiedfeed-sdk</artifactId>
<version>2.0.59.0</version>
</dependency>Change the version number and reload Maven to apply the update.
The example project includes a starter class:
src/main/java/.../UofSdkExamples.javaEdit the configuration inside it:
import com.sportradar.unifiedodds.sdk.OddsFeed;
import com.sportradar.unifiedodds.sdk.OddsFeedConfiguration;
import java.util.Locale;
import java.util.Arrays;
import java.util.List;
public class BasicOddsFeedExampleMain {
public static void main(String[] args) {
// Example: disable certain producers if needed
List<Integer> DisabledProducerList = Arrays.asList(3, 5);
OddsFeedConfiguration config = OddsFeed
.getOddsFeedConfigurationBuilder()
.setAccessToken("abcd1234lubljanajebulana") // Replace with your access token
.selectIntegration() // Integration environment for testing
.setSdkNodeId(42) // Unique ID for this SDK instance
.setDefaultLocale(Locale.ENGLISH) // Language for translations
.setDisabledProducers(DisabledProducerList) // Optional
.build();
// Initialize SDK with the above configuration...
}
}.selectIntegration() β Test environment.selectProduction() β Live environmentLocale.ENGLISH).