Skip to content

Commit 0d56dab

Browse files
committed
products common 1.3.0
1 parent 8e4ebfb commit 0d56dab

File tree

2,033 files changed

+5403
-14348
lines changed

Some content is hidden

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

2,033 files changed

+5403
-14348
lines changed

MIGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For Spot (Spot package):
3737
<dependency>
3838
<groupId>io.github.binance</groupId>
3939
<artifactId>binance-spot</artifactId>
40-
<version>3.0.0</version>
40+
<version>3.1.0</version>
4141
</dependency>
4242
```
4343

@@ -47,7 +47,7 @@ For Futures (COIN-M Futures package):
4747
<dependency>
4848
<groupId>io.github.binance</groupId>
4949
<artifactId>binance-derivatives-trading-coin-futures</artifactId>
50-
<version>1.2.0</version>
50+
<version>1.3.0</version>
5151
</dependency>
5252
```
5353

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Each connector is published as a separate maven dependency. For example:
5454
<dependency>
5555
<groupId>io.github.binance</groupId>
5656
<artifactId>binance-spot</artifactId>
57-
<version>3.0.0</version>
57+
<version>3.1.0</version>
5858
</dependency>
5959
```
6060

clients/algo/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.2.0 - 2025-07-08
4+
5+
- Update `binance/common` module to version `1.3.0`.
6+
- Added `customHeaders` configuration.
7+
38
## 1.1.0 - 2025-05-02
49

510
- Update `binance/common` module to version `1.1.0`.

clients/algo/docs/rest-api/migration-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s
2222
<dependency>
2323
<groupId>io.github.binance</groupId>
2424
<artifactId>binance-algo</artifactId>
25-
<version>1.1.0</version>
25+
<version>1.2.0</version>
2626
</dependency>
2727
```
2828

@@ -91,7 +91,7 @@ by:
9191
<dependency>
9292
<groupId>io.github.binance</groupId>
9393
<artifactId>binance-algo</artifactId>
94-
<version>1.1.0</version>
94+
<version>1.2.0</version>
9595
</dependency>
9696
```
9797

clients/algo/pom.xml

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

1111
<parent>
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>io.github.binance</groupId>
3333
<artifactId>binance-common</artifactId>
34-
<version>1.1.0</version>
34+
<version>1.3.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.1.0 (Java/%s; %s; %s)",
54+
"binance-algo/1.2.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.1.0 (Java/%s; %s; %s)",
52+
"binance-algo/1.2.0 (Java/%s; %s; %s)",
5353
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
5454
private static final boolean HAS_TIME_UNIT = false;
5555

clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderFutureAlgoResponse.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
import java.net.URLEncoder;
2929
import java.nio.charset.StandardCharsets;
3030
import java.util.HashSet;
31-
import java.util.Map;
3231
import java.util.Objects;
33-
import java.util.Set;
3432
import org.hibernate.validator.constraints.*;
3533

3634
/** CancelAlgoOrderFutureAlgoResponse */
@@ -248,18 +246,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
248246
.toString()));
249247
}
250248
}
251-
252-
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
253-
// check to see if the JSON string contains additional fields
254-
for (Map.Entry<String, JsonElement> entry : entries) {
255-
if (!CancelAlgoOrderFutureAlgoResponse.openapiFields.contains(entry.getKey())) {
256-
throw new IllegalArgumentException(
257-
String.format(
258-
"The field `%s` in the JSON string is not defined in the"
259-
+ " `CancelAlgoOrderFutureAlgoResponse` properties. JSON: %s",
260-
entry.getKey(), jsonElement.toString()));
261-
}
262-
}
263249
JsonObject jsonObj = jsonElement.getAsJsonObject();
264250
if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull())
265251
&& !jsonObj.get("msg").isJsonPrimitive()) {
@@ -289,7 +275,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
289275
@Override
290276
public void write(JsonWriter out, CancelAlgoOrderFutureAlgoResponse value)
291277
throws IOException {
292-
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
278+
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
293279
elementAdapter.write(out, obj);
294280
}
295281

clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/CancelAlgoOrderSpotAlgoResponse.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
import java.net.URLEncoder;
2929
import java.nio.charset.StandardCharsets;
3030
import java.util.HashSet;
31-
import java.util.Map;
3231
import java.util.Objects;
33-
import java.util.Set;
3432
import org.hibernate.validator.constraints.*;
3533

3634
/** CancelAlgoOrderSpotAlgoResponse */
@@ -247,18 +245,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
247245
CancelAlgoOrderSpotAlgoResponse.openapiRequiredFields.toString()));
248246
}
249247
}
250-
251-
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
252-
// check to see if the JSON string contains additional fields
253-
for (Map.Entry<String, JsonElement> entry : entries) {
254-
if (!CancelAlgoOrderSpotAlgoResponse.openapiFields.contains(entry.getKey())) {
255-
throw new IllegalArgumentException(
256-
String.format(
257-
"The field `%s` in the JSON string is not defined in the"
258-
+ " `CancelAlgoOrderSpotAlgoResponse` properties. JSON: %s",
259-
entry.getKey(), jsonElement.toString()));
260-
}
261-
}
262248
JsonObject jsonObj = jsonElement.getAsJsonObject();
263249
if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull())
264250
&& !jsonObj.get("msg").isJsonPrimitive()) {
@@ -288,7 +274,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
288274
@Override
289275
public void write(JsonWriter out, CancelAlgoOrderSpotAlgoResponse value)
290276
throws IOException {
291-
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
277+
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
292278
elementAdapter.write(out, obj);
293279
}
294280

clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/QueryCurrentAlgoOpenOrdersFutureAlgoResponse.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
import java.util.Collection;
3434
import java.util.HashSet;
3535
import java.util.List;
36-
import java.util.Map;
3736
import java.util.Objects;
38-
import java.util.Set;
3937
import java.util.stream.Collectors;
4038
import org.hibernate.validator.constraints.*;
4139

@@ -209,20 +207,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
209207
.toString()));
210208
}
211209
}
212-
213-
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
214-
// check to see if the JSON string contains additional fields
215-
for (Map.Entry<String, JsonElement> entry : entries) {
216-
if (!QueryCurrentAlgoOpenOrdersFutureAlgoResponse.openapiFields.contains(
217-
entry.getKey())) {
218-
throw new IllegalArgumentException(
219-
String.format(
220-
"The field `%s` in the JSON string is not defined in the"
221-
+ " `QueryCurrentAlgoOpenOrdersFutureAlgoResponse` properties."
222-
+ " JSON: %s",
223-
entry.getKey(), jsonElement.toString()));
224-
}
225-
}
226210
JsonObject jsonObj = jsonElement.getAsJsonObject();
227211
if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) {
228212
JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders");
@@ -267,7 +251,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
267251
public void write(
268252
JsonWriter out, QueryCurrentAlgoOpenOrdersFutureAlgoResponse value)
269253
throws IOException {
270-
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
254+
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
271255
elementAdapter.write(out, obj);
272256
}
273257

0 commit comments

Comments
 (0)