Preparation
Environment Requirements
- Operating System Requirements:
- Windows
- MacOS
- Linux
- Solaris
- Programming Language Version Requirements: Java JDK 1.7 (64-bit) and above.
Installing Java Development Kit
For best support and to reduce compatibility issues, we recommend installing JDK 1.8+.
Install the latest version of JDK:
- Visit the Oracle official website download page: https://www.oracle.com/java/technologies/downloads/;
- Note that you need to select the corresponding installation package according to your operating system, download the installation package and install it following the prompts.
Getting TradeUP OpenAPI Java SDK
Method 1: Using Maven Repository (Recommended)
We recommend that you obtain the SDK by adding Maven dependencies. Java developers can get the Java SDK through Maven repository. The Maven repository is updated periodically. The current latest version is as follows:
Please add the following code to your pom.xml file:
<dependency>
<groupId>io.github.tigerbrokers</groupId>
<artifactId>openapi-java-sdk</artifactId>
<version>2.4.3</version>
</dependency>If the SDK cannot be downloaded, please try adding the following repository to your local project's pom.xml file:
<repositories>
<repository>
<id>sonatype-public</id>
<name>sonatype-public</name>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>Method 2: Github/Gitee Code Repository
The source code of the SDK project is published on both Github and Gitee code repositories.
- Github address: https://github.com/tigerbrokers/openapi-java-sdk
- Gitee address: https:// gitee.com/tigerbrokers/openapi-java-sdk
You can choose to clone or download the source code from the code repository and manually add dependencies.
Installing IDE
We recommend using IntelliJ IDEA as your integrated development environment.
Developer Registration Information
In order to access OpenAPI, you will need to open and fund your TradeUP account, and then apply for OpenAPI permissions.
For detailed instructions for individual investors, see the Developer Registration Information
For detailed instructions for institutional investors, see the Developer Registration Information
RSA Keys
OpenAPI uses RSA encryption for authentication. The RSA bidirectional signature authentication mechanism is used to prevent interface requests from being maliciously tampered with. Users must save their private keys locally.
Please store your private key in a local and secure place to prevent unauthorized exposure or loss of personal information.
Your private key will not be stored on TradeUP’s server and will disappear automatically when the page is refreshed. If you fail to save your private key, it may be replaced by clicking the re-generate button.
Attention:
The Java SDK private key format is different from that used by the Python SDK. The Java private key uses PKCS#8. Please ensure your private key is in the correct format.
Updated 7 days ago