Skip to content

Commit 99c4023

Browse files
author
方佳
committed
Merge branch 'main_merge_260523_07' into 'main'
feat: Add support for Webull AU and TH See merge request webull/webull-openapi-java-sdk!32
2 parents 3289f2d + a84e836 commit 99c4023

11 files changed

Lines changed: 47 additions & 32 deletions

File tree

‎README.md‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Webull OpenAPI Java SDK
22

3-
Note: This is the new version of the Webull SDK, currently applicable only to Webull Hong Kong, Webull US, or Webull JP, or Webull SG customers.
3+
Note: This is the new version of the Webull SDK, currently applicable only to Webull Hong Kong, Webull US, Webull JP, Webull SG, Webull AU, or Webull TH customers.
44

55
Webull OpenAPI aims to provide quantitative trading investors with convenient, fast and secure services. Webull aims to help every quant traders achieve flexible and changeable trading or market strategies.
66

@@ -18,12 +18,14 @@ Subscription to real-time information: Subscribe to order status changes, market
1818

1919
- Please first generate the app key and app secret on the Webull official website.
2020

21-
| Broker | Link |
22-
|-----------|------------------------------------------------|
23-
| Webull HK | https://www.webull.hk/open-api |
21+
| Broker | Link |
22+
|-----------|-------------------------------------------------|
23+
| Webull HK | https://www.webull.hk/open-api |
2424
| Webull US | https://www.webull.com/center#openApiManagement |
25-
| Webull JP | https://www.webull.co.jp/center/openapi/manage |
26-
| Webull SG | https://www.webull.com.sg/open-api-management|
25+
| Webull JP | https://www.webull.co.jp/center/openapi/manage |
26+
| Webull SG | https://www.webull.com.sg/open-api-management |
27+
| Webull TH | https://www.webull.co.th/open-api-management |
28+
| Webull AU | https://www.webull.com.au/open-api-management |
2729

2830
- Requires JDK 8 and above.
2931

@@ -39,9 +41,11 @@ The bottom layer of Webull OpenAPI provides three protocols, HTTP / GRPC / MQTT,
3941

4042
## Developer documentation
4143

42-
| Broker | Link |
43-
|-----------|------------------------------------------|
44-
| Webull HK | https://developer.webull.hk/apis/docs |
45-
| Webull US | https://developer.webull.com/apis/docs |
46-
| Webull JP | https://developer.webull.co.jp/apis/docs |
44+
| Broker | Link |
45+
|-----------|-------------------------------------------|
46+
| Webull HK | https://developer.webull.hk/apis/docs |
47+
| Webull US | https://developer.webull.com/apis/docs |
48+
| Webull JP | https://developer.webull.co.jp/apis/docs |
4749
| Webull SG | https://developer.webull.com.sg/apis/docs |
50+
| Webull TH | https://developer.webull.co.th/apis/docs |
51+
| Webull AU | https://developer.webull.com.au/apis/docs |

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<groupId>com.webull.openapi</groupId>
2222
<artifactId>webull-openapi-java-sdk-parent</artifactId>
2323
<packaging>pom</packaging>
24-
<version>1.1.9</version>
24+
<version>1.1.10</version>
2525

2626
<name>webull-openapi-java-sdk-parent</name>
2727
<url>https://github.com/webull-inc/webull-openapi-java-sdk/</url>

‎webull-openapi-java-sdk-samples/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>com.webull.openapi</groupId>
2121
<artifactId>webull-openapi-java-sdk-parent</artifactId>
22-
<version>1.1.9</version>
22+
<version>1.1.10</version>
2323
</parent>
2424
<modelVersion>4.0.0</modelVersion>
2525

‎webull-openapi-java-sdk/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.webull.openapi</groupId>
99
<artifactId>webull-openapi-java-sdk-parent</artifactId>
10-
<version>1.1.9</version>
10+
<version>1.1.10</version>
1111
</parent>
1212

1313
<artifactId>webull-openapi-java-sdk</artifactId>

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/core/common/ApiModule.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ public enum ApiModule {
2121
/**
2222
* api
2323
*/
24-
API(DefaultHost.API_US, DefaultHost.API_HK, DefaultHost.API_JP,DefaultHost.API_SG),
24+
API(DefaultHost.API_US, DefaultHost.API_HK, DefaultHost.API_JP, DefaultHost.API_SG,
25+
DefaultHost.API_TH,DefaultHost.API_AU),
2526
/**
2627
* quotes api
2728
*/
28-
QUOTES(DefaultHost.QUOTES_US, DefaultHost.QUOTES_HK, DefaultHost.QUOTES_JP,DefaultHost.QUOTES_SG),
29+
QUOTES(DefaultHost.QUOTES_US, DefaultHost.QUOTES_HK, DefaultHost.QUOTES_JP, DefaultHost.QUOTES_SG,
30+
DefaultHost.QUOTES_TH,DefaultHost.QUOTES_AU),
2931
/**
3032
* events api
3133
*/
32-
EVENTS(DefaultHost.EVENTS_US, DefaultHost.EVENTS_HK, DefaultHost.EVENTS_JP,DefaultHost.EVENTS_SG),
34+
EVENTS(DefaultHost.EVENTS_US, DefaultHost.EVENTS_HK, DefaultHost.EVENTS_JP, DefaultHost.EVENTS_SG,
35+
DefaultHost.EVENTS_TH,DefaultHost.EVENTS_AU),
3336
;
3437

3538
private final EnumMap<Region, String> hosts;

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/core/common/DefaultHost.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ private DefaultHost() {}
3535
public static final String QUOTES_SG = "data-api.webull.com.sg";
3636
public static final String EVENTS_SG = "events-api.webull.com.sg";
3737

38+
public static final String API_TH = "api.webull.co.th";
39+
public static final String QUOTES_TH = "data-api.webull.co.th";
40+
public static final String EVENTS_TH = "events-api.webull.co.th";
41+
42+
public static final String API_AU = "api.webull.com.au";
43+
public static final String QUOTES_AU = "data-api.webull.com.au";
44+
public static final String EVENTS_AU = "events-api.webull.com.au";
45+
3846
public static final String API_HK_SANDBOX = "api.sandbox.webull.hk";
3947
public static final String EVENTS_HK_SANDBOX = "events-api.sandbox.webull.hk";
4048

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/core/common/Region.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
public enum Region {
2121

22-
us, hk, jp,sg;
22+
us, hk, jp, sg, th, au;
2323

2424
public static Optional<Region> of(String name) {
2525
for (Region region : Region.values()) {

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/core/config/ProjectReaderHelper.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private ProjectReaderHelper() {
2424

2525
private static final String APPLICATION_VERSION = "application.version";
2626

27-
private static final String DEFAULT_APPLICATION_VERSION = "1.1.9";
27+
private static final String DEFAULT_APPLICATION_VERSION = "1.1.10";
2828

2929
private static final String APPLICATION_NAME = "application.name";
3030

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/trade/TradeEventClient.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public ISubscription subscribe(SubscribeRequest request) {
9292
.build();
9393

9494
byte[] requestBytes = grpcRequest.toByteArray();
95-
CallCredentials credentials = new SignatureCallCredentials(appKey, appSecret, requestBytes);
95+
CallCredentials credentials = new SignatureCallCredentials(appKey, appSecret, requestBytes,host);
9696
EventServiceGrpc.EventServiceStub credentialsStub = this.stub.withCallCredentials(credentials);
9797

9898
StatefulResponseObserver<Events.SubscribeRequest, Events.SubscribeResponse> responseObserver =

‎webull-openapi-java-sdk/src/main/java/com/webull/openapi/trade/grpc/auth/SignatureCallCredentials.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public class SignatureCallCredentials extends CallCredentials {
6060
private final byte[] requestBytes;
6161
private String userId;
6262

63-
public SignatureCallCredentials(String appKey, String appSecret, byte[] requestBytes) {
64-
this(appKey, appSecret, null, null, null, requestBytes);
63+
public SignatureCallCredentials(String appKey, String appSecret, byte[] requestBytes,String host) {
64+
this(appKey, appSecret, host, null, null, requestBytes);
6565
}
6666

6767
public SignatureCallCredentials(String appKey, String appSecret, String host, Integer port, String url, byte[] requestBytes) {

0 commit comments

Comments
 (0)