Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ For Spot (Spot package):
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-spot</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</dependency>
```

Expand All @@ -47,7 +47,7 @@ For Futures (COIN-M Futures package):
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-derivatives-trading-coin-futures</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Each connector is published as a separate maven dependency. For example:
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-spot</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</dependency>
```

Expand Down
5 changes: 5 additions & 0 deletions clients/algo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.2.0 - 2025-07-08

- Update `binance/common` module to version `1.3.0`.
- Added `customHeaders` configuration.

## 1.1.0 - 2025-05-02

- Update `binance/common` module to version `1.1.0`.
Expand Down
4 changes: 2 additions & 2 deletions clients/algo/docs/rest-api/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-algo</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```

Expand Down Expand Up @@ -91,7 +91,7 @@ by:
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-algo</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions clients/algo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>binance-algo</artifactId>
<name>algo</name>
<version>1.1.0</version>
<version>1.2.0</version>
<packaging>jar</packaging>

<parent>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-common</artifactId>
<version>1.1.0</version>
<version>1.3.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class FutureAlgoApi {

private static final String USER_AGENT =
String.format(
"binance-algo/1.1.0 (Java/%s; %s; %s)",
"binance-algo/1.2.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class SpotAlgoApi {

private static final String USER_AGENT =
String.format(
"binance-algo/1.1.0 (Java/%s; %s; %s)",
"binance-algo/1.2.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.hibernate.validator.constraints.*;

/** CancelAlgoOrderFutureAlgoResponse */
Expand Down Expand Up @@ -248,18 +246,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!CancelAlgoOrderFutureAlgoResponse.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `CancelAlgoOrderFutureAlgoResponse` properties. JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull())
&& !jsonObj.get("msg").isJsonPrimitive()) {
Expand Down Expand Up @@ -289,7 +275,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
@Override
public void write(JsonWriter out, CancelAlgoOrderFutureAlgoResponse value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.hibernate.validator.constraints.*;

/** CancelAlgoOrderSpotAlgoResponse */
Expand Down Expand Up @@ -247,18 +245,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
CancelAlgoOrderSpotAlgoResponse.openapiRequiredFields.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!CancelAlgoOrderSpotAlgoResponse.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `CancelAlgoOrderSpotAlgoResponse` properties. JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull())
&& !jsonObj.get("msg").isJsonPrimitive()) {
Expand Down Expand Up @@ -288,7 +274,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
@Override
public void write(JsonWriter out, CancelAlgoOrderSpotAlgoResponse value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.hibernate.validator.constraints.*;

Expand Down Expand Up @@ -209,20 +207,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!QueryCurrentAlgoOpenOrdersFutureAlgoResponse.openapiFields.contains(
entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `QueryCurrentAlgoOpenOrdersFutureAlgoResponse` properties."
+ " JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) {
JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders");
Expand Down Expand Up @@ -267,7 +251,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
public void write(
JsonWriter out, QueryCurrentAlgoOpenOrdersFutureAlgoResponse value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.hibernate.validator.constraints.*;

/** QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner */
Expand Down Expand Up @@ -624,20 +622,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner.openapiFields.contains(
entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner`"
+ " properties. JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull())
&& !jsonObj.get("symbol").isJsonPrimitive()) {
Expand Down Expand Up @@ -753,7 +737,7 @@ public void write(
JsonWriter out,
QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.hibernate.validator.constraints.*;

Expand Down Expand Up @@ -209,20 +207,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!QueryCurrentAlgoOpenOrdersSpotAlgoResponse.openapiFields.contains(
entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `QueryCurrentAlgoOpenOrdersSpotAlgoResponse` properties."
+ " JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) {
JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders");
Expand Down Expand Up @@ -266,7 +250,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
public void write(
JsonWriter out, QueryCurrentAlgoOpenOrdersSpotAlgoResponse value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.hibernate.validator.constraints.*;

/** QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner */
Expand Down Expand Up @@ -587,20 +585,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner.openapiFields.contains(
entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner`"
+ " properties. JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull())
&& !jsonObj.get("symbol").isJsonPrimitive()) {
Expand Down Expand Up @@ -708,7 +692,7 @@ public void write(
JsonWriter out,
QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.hibernate.validator.constraints.*;

Expand Down Expand Up @@ -209,20 +207,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
.toString()));
}
}

Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!QueryHistoricalAlgoOrdersFutureAlgoResponse.openapiFields.contains(
entry.getKey())) {
throw new IllegalArgumentException(
String.format(
"The field `%s` in the JSON string is not defined in the"
+ " `QueryHistoricalAlgoOrdersFutureAlgoResponse` properties."
+ " JSON: %s",
entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) {
JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders");
Expand Down Expand Up @@ -266,7 +250,7 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
public void write(
JsonWriter out, QueryHistoricalAlgoOrdersFutureAlgoResponse value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

Expand Down
Loading