Skip to content

Commit a04c2eb

Browse files
committed
release v1.1.0 for all modules
1 parent 9a5a107 commit a04c2eb

File tree

220 files changed

+3162
-534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+3162
-534
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Binance Java Connectors
22

33
[![Build Status](https://img.shields.io/github/actions/workflow/status/binance/binance-connector-java/java.yml)](https://github.com/binance/binance-connector-java/actions)
4-
[![Open Issues](https://img.shields.io/github/issues/binance/binance-connector-java)](https://github.com/binance/binance-connector-java/issues)[![Code Style: Spotless](https://img.shields.io/badge/code%20style-spotless-ff69b4)](https://github.com/diffplug/spotless)
4+
[![Open Issues](https://img.shields.io/github/issues/binance/binance-connector-java)](https://github.com/binance/binance-connector-java/issues)
5+
[![Code Style: Spotless](https://img.shields.io/badge/code%20style-spotless-ff69b4)](https://github.com/diffplug/spotless)
56
![Java Version](https://img.shields.io/badge/Java-%3E=11-brightgreen)
67
[![Known Vulnerabilities](https://snyk.io/test/github/binance/binance-connector-java/badge.svg)](https://snyk.io/test/github/binance/binance-connector-java)
78
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -16,7 +17,7 @@ Before using the connectors, ensure you have:
1617

1718
## Available Connectors
1819
- [binance-algo](clients/algo) - Algo Trading connector
19-
- [binance-auto-invest](clients/auto-invest) - Auto Invest connector
20+
- **Deprecated**: ~~[binance-auto-invest](clients/auto-invest) - Auto Invest connector~~
2021
- [binance-c2c](clients/c2c) - C2C connector
2122
- [binance-convert](clients/convert) - Convert connector
2223
- [binance-copy-trading](clients/copy-trading) - Copy Trading connector
@@ -179,8 +180,6 @@ When creating WebSocket API clients (such as SpotWebSocketApi), you can follow:
179180
## Examples
180181
**Algo**: [Rest API](clients/algo/example_rest.md)
181182

182-
**Auto Invest**: [Rest API](clients/auto-invest/example_rest.md)
183-
184183
**C2c**: [Rest API](clients/c2c/example_rest.md)
185184

186185
**Convert**: [Rest API](clients/convert/example_rest.md)

clients/algo/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## 1.1.0 - 2025-05-02
4+
5+
- Update `binance/common` module to version `1.1.0`.
6+
- Adding `proxyAuthenticator` support.
7+
- URL Encode query params.
8+
9+
## 1.0.0 - 2025-04-24
10+
11+
- Initial release

clients/algo/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Open Issues](https://img.shields.io/github/issues/binance/binance-connector-java)](https://github.com/binance/binance-connector-java/issues)
44
[![Code Style: Spotless](https://img.shields.io/badge/code%20style-spotless-ff69b4)](https://github.com/diffplug/spotless)
5-
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.binance/binance-algo)
5+
[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.binance/binance-algo)](https://central.sonatype.com/artifact/io.github.binance/binance-algo)
66
![Java Version](https://img.shields.io/badge/Java-%3E=11-brightgreen)
77
[![Known Vulnerabilities](https://snyk.io/test/github/binance/binance-connector-java/badge.svg)](https://snyk.io/test/github/binance/binance-connector-java)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -30,7 +30,7 @@ This is a client library for the Binance Algo API, enabling developers to intera
3030

3131
## Installation
3232

33-
To use this library, ensure your environment is running Java version **17** or newer.
33+
To use this library, ensure your environment is running Java version **11** or newer.
3434

3535
Then add dependency to pom.xml:
3636

@@ -44,11 +44,11 @@ Then add dependency to pom.xml:
4444

4545
## Documentation
4646

47-
For detailed information, refer to the [Binance API Documentation](https://developers.binance.com/docs/%{productName%}).
47+
For detailed information, refer to the [Binance API Documentation](https://developers.binance.com/docs/algo).
4848

4949
### REST APIs
5050

51-
All REST API endpoints are available through the [`rest-api`](./src/main/java/com/binance/connector/client/%{productName%}/rest) module. Note that some endpoints require authentication using your Binance API credentials.
51+
All REST API endpoints are available through the [`rest`](./src/main/java/com/binance/connector/client/algo/rest) module. Note that some endpoints require authentication using your Binance API credentials.
5252

5353
```java
5454
import com.binance.connector.client.algo.rest.AlgoRestApiUtil;
@@ -68,7 +68,7 @@ public static void main(String[] args) {
6868
}
6969
```
7070

71-
More examples can be found in the [`examples/rest-api`](./examples/algo/src/main/java/com/binance/connector/client/algo/rest) folder.
71+
More examples can be found in the [`examples/rest`](./../../examples/algo/src/main/java/com/binance/connector/client/algo/rest) folder.
7272

7373
#### Configuration Options
7474

@@ -107,10 +107,6 @@ Enable or disable response compression. See the [Compression example](./docs/res
107107

108108
Configure the number of retry attempts and delay in milliseconds between retries for failed requests. See the [Retries example](./docs/rest-api/retries.md) for detailed usage.
109109

110-
##### HTTPS Agent
111-
112-
Customize the HTTPS agent for advanced TLS configurations. See the [HTTPS Agent example](./docs/rest-api/httpsAgent.md) for detailed usage.
113-
114110
##### Key Pair Based Authentication
115111

116112
The REST API supports key pair-based authentication for secure communication. You can use `RSA` or `ED25519` keys for signing requests. See the [Key Pair Based Authentication example](./docs/rest-api/key-pair-authentication.md) for detailed usage.
@@ -134,7 +130,7 @@ If `basePath` is not provided, it defaults to `https://api.binance.com`.
134130
To run the tests:
135131

136132
```bash
137-
mvn -f clients/pom.xml -pl algo
133+
mvn -f clients/pom.xml -pl algo test
138134
```
139135

140136
The tests cover:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Error Handling
2+
3+
```java
4+
String symbol = "BNBUSDT";
5+
try {
6+
ApiResponse<AccountCommissionResponse> response = getApi().accountCommission(symbol);
7+
System.out.println(response.getData());
8+
} catch (ApiException exception) {
9+
// get http code
10+
int httpCode = exception.getCode();
11+
// get error message
12+
String message = exception.getMessage();
13+
// headers are in lowercase
14+
List<String> retryafter = exception.getResponseHeaders().get("retry-after");
15+
System.out.println(retryafter);
16+
}
17+
```

clients/algo/docs/rest-api/proxy.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
```java
44
import com.binance.connector.client.algo.rest.AlgoRestApiUtil;
55
import com.binance.connector.client.algo.rest.api.AlgoRestApi;
6-
import com.binance.connector.client.common.ApiException;
7-
import com.binance.connector.client.common.ApiResponse;
86
import com.binance.connector.client.common.configuration.ClientConfiguration;
97
import com.binance.connector.client.common.configuration.SignatureConfiguration;
8+
import okhttp3.Authenticator;
9+
import okhttp3.Credentials;
10+
import okhttp3.Request;
11+
import okhttp3.Response;
12+
import okhttp3.Route;
13+
14+
import java.io.IOException;
15+
import java.net.InetSocketAddress;
16+
import java.net.Proxy;
1017

1118
public static void main(String[] args) {
1219
ClientConfiguration clientConfiguration = AlgoRestApiUtil.getClientConfiguration();
@@ -20,6 +27,19 @@
2027
// Add the proxy to the configuration
2128
clientConfiguration.setProxy(proxy);
2229

30+
// Create the Proxy Authenticator
31+
Authenticator proxyAuthenticator = new Authenticator() {
32+
@Override public Request authenticate(Route route, Response response) throws IOException {
33+
String credential = Credentials.basic("username", "password");
34+
return response.request().newBuilder()
35+
.header("Proxy-Authorization", credential)
36+
.build();
37+
}
38+
};
39+
40+
// Add the proxy authenticator to the configuration
41+
clientConfiguration.setProxyAuthenticator(proxyAuthenticator);
42+
2343
AlgoRestApi api = new AlgoRestApi(clientConfiguration);
2444
}
2545
```

clients/algo/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>binance-algo</artifactId>
77
<name>algo</name>
8-
<version>1.0.0</version>
8+
<version>1.1.0</version>
99
<packaging>jar</packaging>
1010

1111
<parent>
1212
<groupId>io.github.binance</groupId>
1313
<artifactId>binance-connector-java-clients</artifactId>
14-
<version>1.0.0</version>
14+
<version>1.1.0</version>
1515
</parent>
1616

1717
<build>
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>io.github.binance</groupId>
3333
<artifactId>binance-common</artifactId>
34-
<version>1.0.0</version>
34+
<version>1.1.0</version>
3535
</dependency>
3636
</dependencies>
3737
</project>

clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class FutureAlgoApi {
5151

5252
private static final String USER_AGENT =
5353
String.format(
54-
"binance-algo/1.0.0 (Java/%s; %s; %s)",
54+
"binance-algo/1.1.0 (Java/%s; %s; %s)",
5555
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
5656
private static final boolean HAS_TIME_UNIT = false;
5757

clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class SpotAlgoApi {
4949

5050
private static final String USER_AGENT =
5151
String.format(
52-
"binance-algo/1.0.0 (Java/%s; %s; %s)",
52+
"binance-algo/1.1.0 (Java/%s; %s; %s)",
5353
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
5454
private static final boolean HAS_TIME_UNIT = false;
5555

clients/auto-invest/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## 1.1.0 - 2025-05-02
4+
5+
- Update `binance/common` module to version `1.1.0`.
6+
- Adding `proxyAuthenticator` support.
7+
- URL Encode query params.
8+
9+
## 1.0.0 - 2025-04-24
10+
11+
- Initial release

clients/auto-invest/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Binance Java AutoInvest Connector
1+
# **DEPRECATED** - Binance Java Auto Invest Connector
2+
## **This module is deprecated and will be removed, please do not use it.**
23

34
[![Open Issues](https://img.shields.io/github/issues/binance/binance-connector-java)](https://github.com/binance/binance-connector-java/issues)
45
[![Code Style: Spotless](https://img.shields.io/badge/code%20style-spotless-ff69b4)](https://github.com/diffplug/spotless)
5-
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.binance/binance-auto-invest)
6+
[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.binance/binance-auto-invest)](https://central.sonatype.com/artifact/io.github.binance/binance-auto-invest)
67
![Java Version](https://img.shields.io/badge/Java-%3E=11-brightgreen)
78
[![Known Vulnerabilities](https://snyk.io/test/github/binance/binance-connector-java/badge.svg)](https://snyk.io/test/github/binance/binance-connector-java)
89
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -30,7 +31,7 @@ This is a client library for the Binance Algo API, enabling developers to intera
3031

3132
## Installation
3233

33-
To use this library, ensure your environment is running Java version **17** or newer.
34+
To use this library, ensure your environment is running Java version **11** or newer.
3435

3536
Then add dependency to pom.xml:
3637

@@ -44,11 +45,11 @@ Then add dependency to pom.xml:
4445

4546
## Documentation
4647

47-
For detailed information, refer to the [Binance API Documentation](https://developers.binance.com/docs/%{productName%}).
48+
For detailed information, refer to the [Binance API Documentation](https://developers.binance.com/docs/auto_invest).
4849

4950
### REST APIs
5051

51-
All REST API endpoints are available through the [`rest-api`](./src/main/java/com/binance/connector/client/%{productName%}/rest) module. Note that some endpoints require authentication using your Binance API credentials.
52+
All REST API endpoints are available through the [`rest`](./src/main/java/com/binance/connector/client/auto_invest/rest) module. Note that some endpoints require authentication using your Binance API credentials.
5253

5354
```java
5455
import com.binance.connector.client.auto_invest.rest.AutoInvestRestApiUtil;
@@ -68,7 +69,7 @@ public static void main(String[] args) {
6869
}
6970
```
7071

71-
More examples can be found in the [`examples/rest-api`](./examples/auto-invest/src/main/java/com/binance/connector/client/auto-invest/rest) folder.
72+
More examples can be found in the [`examples/rest`](./../../examples/auto-invest/src/main/java/com/binance/connector/client/auto_invest/rest) folder.
7273

7374
#### Configuration Options
7475

@@ -107,10 +108,6 @@ Enable or disable response compression. See the [Compression example](./docs/res
107108

108109
Configure the number of retry attempts and delay in milliseconds between retries for failed requests. See the [Retries example](./docs/rest-api/retries.md) for detailed usage.
109110

110-
##### HTTPS Agent
111-
112-
Customize the HTTPS agent for advanced TLS configurations. See the [HTTPS Agent example](./docs/rest-api/httpsAgent.md) for detailed usage.
113-
114111
##### Key Pair Based Authentication
115112

116113
The REST API supports key pair-based authentication for secure communication. You can use `RSA` or `ED25519` keys for signing requests. See the [Key Pair Based Authentication example](./docs/rest-api/key-pair-authentication.md) for detailed usage.
@@ -134,7 +131,7 @@ If `basePath` is not provided, it defaults to `https://api.binance.com`.
134131
To run the tests:
135132

136133
```bash
137-
mvn -f clients/pom.xml -pl auto-invest
134+
mvn -f clients/pom.xml -pl auto-invest test
138135
```
139136

140137
The tests cover:

0 commit comments

Comments
 (0)