toMap() {
if (modifyIdValue != null) {
valMap.put("modifyId", modifyIdValue);
}
+ Object reduceOnlyValue = getReduceOnly();
+ if (reduceOnlyValue != null) {
+ valMap.put("reduceOnly", reduceOnlyValue);
+ }
Object recvWindowValue = getRecvWindow();
if (recvWindowValue != null) {
valMap.put("recvWindow", recvWindowValue);
@@ -497,6 +535,7 @@ private String toIndentedString(Object o) {
openapiFields.add("price");
openapiFields.add("priceMatch");
openapiFields.add("modifyId");
+ openapiFields.add("reduceOnly");
openapiFields.add("recvWindow");
// a set of required properties/fields (JSON key names)
@@ -577,6 +616,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("priceMatch") != null && !jsonObj.get("priceMatch").isJsonNull()) {
PriceMatch.validateJsonElement(jsonObj.get("priceMatch"));
}
+ // validate the optional field `reduceOnly`
+ if (jsonObj.get("reduceOnly") != null && !jsonObj.get("reduceOnly").isJsonNull()) {
+ ReduceOnly.validateJsonElement(jsonObj.get("reduceOnly"));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SelfTradePreventionMode.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SelfTradePreventionMode.java
index 304d07602..267464af9 100644
--- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SelfTradePreventionMode.java
+++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/model/SelfTradePreventionMode.java
@@ -22,8 +22,8 @@
import org.hibernate.validator.constraints.*;
/**
- * `NONE`:No STP / `EXPIRE_TAKER`:expire taker order when STP triggers/
- * `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire
+ * `NONE`: No STP / `EXPIRE_TAKER`: expire taker order when STP triggers/
+ * `EXPIRE_MAKER`: expire taker order when STP triggers/ `EXPIRE_BOTH`: expire
* both orders when STP triggers; default `NONE`
*/
@JsonAdapter(SelfTradePreventionMode.Adapter.class)
diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java
index 65838164e..4cf98ae39 100644
--- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java
+++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java
@@ -60,7 +60,7 @@
public class DerivativesTradingUsdsFuturesWebSocketStreams {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-usds-futures/12.0.3 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private WebSocketClientConfiguration clientConfiguration;
diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java
index 6e74cda0e..f36d1f5a5 100644
--- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java
+++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java
@@ -67,7 +67,7 @@
public class MarketApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-usds-futures/12.0.3 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private StreamConnectionInterface connection;
@@ -1380,17 +1380,19 @@ private void markPriceStreamForAllMarketValidateBeforeCall(
/**
* Trading Session Stream Trading session information for the underlying assets of TradFi
* Perpetual contracts, covering the U.S. equity market, Korean equity market, Hong Kong equity
- * market, China equity market, and the commodity market, is updated every second. Trading
- * session information for different underlying markets is pushed in separate messages. **Event
- * type:** - `EquityUpdate`: Session types for the U.S. equity market include
- * \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\",
+ * market, China equity market, the commodity market, and the FX market, is updated every
+ * second. Trading session information for different underlying markets is pushed in separate
+ * messages. **Event type:** - `EquityUpdate`: Session types for the U.S. equity
+ * market include \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\",
* \"OVERNIGHT\", and \"NO_TRADING\". - `CommodityUpdate`: Session
* types for the commodity market include \"REGULAR\" and \"NO_TRADING\". -
* `KR_EquityUpdate`: Session types for the Korean equity market include
* \"REGULAR\" and \"NO_TRADING\". - `HK_EquityUpdate`: Session
* types for the Hong Kong equity market include \"REGULAR\" and
* \"NO_TRADING\". - `CN_EquityUpdate`: Session types for the China equity
- * market include \"REGULAR\" and \"NO_TRADING\". Update Speed: 1s
+ * market include \"REGULAR\" and \"NO_TRADING\". - `FXUpdate`:
+ * Session types for the FX market include \"REGULAR\" and \"NO_TRADING\".
+ * Update Speed: 1s
*
* @param tradingSessionStreamRequest (required)
* @return TradingSessionStreamResponse
diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java
index 113209515..b2e0a89f4 100644
--- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java
+++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java
@@ -47,7 +47,7 @@
public class PublicApi {
private static final String USER_AGENT =
String.format(
- "binance-derivatives-trading-usds-futures/12.0.3 (Java/%s; %s; %s)",
+ "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private StreamConnectionInterface connection;
diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamResponse.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamResponse.java
index d54d26b95..33cdc65cf 100644
--- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamResponse.java
+++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/model/TradingSessionStreamResponse.java
@@ -77,7 +77,8 @@ public TradingSessionStreamResponse eLowerCase(@jakarta.annotation.Nullable Stri
}
/**
- * Event type, can also be CommodityUpdate, KR_EquityUpdate, HK_EquityUpdate or CN_EquityUpdate
+ * Event type, can also be CommodityUpdate, KR_EquityUpdate, HK_EquityUpdate, CN_EquityUpdate or
+ * FXUpdate
*
* @return eLowerCase
*/
diff --git a/examples/derivatives-trading-usds-futures/pom.xml b/examples/derivatives-trading-usds-futures/pom.xml
index 25120e0dd..cdf1989c6 100644
--- a/examples/derivatives-trading-usds-futures/pom.xml
+++ b/examples/derivatives-trading-usds-futures/pom.xml
@@ -31,7 +31,7 @@
io.github.binance
binance-derivatives-trading-usds-futures
- 12.0.3
+ 12.1.0
\ No newline at end of file
diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java
index f3ef595c1..b5a4aaac5 100644
--- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java
+++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java
@@ -32,13 +32,14 @@ public DerivativesTradingUsdsFuturesRestApi getApi() {
* Trading session schedules for the underlying assets of TradFi Perps are provided for a
* one-week period forward and one-week period backward starting from the day prior to the query
* time, covering the U.S. equity market, Korean equity market, Hong Kong equity market, China
- * equity market, and the commodity market. Session types per market: - U.S. equity market:
- * \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\",
+ * equity market, the commodity market, and the FX market. Session types per market: - U.S.
+ * equity market: \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\",
* \"OVERNIGHT\", \"NO_TRADING\". - Commodity market: \"REGULAR\",
* \"NO_TRADING\". - Korean equity market: \"REGULAR\",
* \"NO_TRADING\". - Hong Kong equity market: \"REGULAR\",
* \"NO_TRADING\". - China equity market: \"REGULAR\",
- * \"NO_TRADING\". Weight(IP): 5
+ * \"NO_TRADING\". - FX market: \"REGULAR\", \"NO_TRADING\".
+ * Weight(IP): 5
*
* @throws ApiException if the Api call fails
*/
diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java
index fd740da16..a4c5db3ce 100644
--- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java
+++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java
@@ -43,7 +43,16 @@ public DerivativesTradingUsdsFuturesRestApi getApi() {
* following situations: - when the order is in partially filled status and the new
* `quantity` <= `executedQty` - When the order is `GTX`
* and the new price will cause it to be executed immediately - One order can only be modfied
- * for less than 10000 times
+ * for less than 10000 times - `reduceOnly` behavior: - `false` or omitted:
+ * behave as today — `min_notional` is enforced on the modified order. -
+ * `true` and the original order's `reduceOnly` attribute is also
+ * `true` (consistent): the `min_notional` check is skipped on the modified
+ * order, matching placement semantics. - `true` but the original order's
+ * `reduceOnly` attribute is `false` (inconsistent): the modify request is
+ * rejected with error code `-5047`, \"The original order is not a reduce-only
+ * order\". - `reduceOnly` is used purely for validation — passing
+ * `true` does not change the original order's `reduceOnly` attribute;
+ * that flag remains whatever it was set to at placement time.
*
* @throws ApiException if the Api call fails
*/
diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java
index 8efb26a54..e8890ab8e 100644
--- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java
+++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java
@@ -44,7 +44,16 @@ public DerivativesTradingUsdsFuturesWebSocketApi getApi() {
* will be cancelled by the amendment in the following situations: - when the order is in
* partially filled status and the new `quantity` <= `executedQty` -
* When the order is `GTX` and the new price will cause it to be executed immediately
- * - One order can only be modfied for less than 10000 times
+ * - One order can only be modfied for less than 10000 times - `reduceOnly` behavior:
+ * - `false` or omitted: behave as today — `min_notional` is enforced on the
+ * modified order. - `true` and the original order's `reduceOnly`
+ * attribute is also `true` (consistent): the `min_notional` check is
+ * skipped on the modified order, matching placement semantics. - `true` but the
+ * original order's `reduceOnly` attribute is `false` (inconsistent):
+ * the modify request is rejected with error code `-5047`, \"The original order
+ * is not a reduce-only order\". - `reduceOnly` is used purely for validation —
+ * passing `true` does not change the original order's `reduceOnly`
+ * attribute; that flag remains whatever it was set to at placement time.
*/
public void modifyOrderExampleAsync() {
ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest();
@@ -78,7 +87,16 @@ public void modifyOrderExampleAsync() {
* will be cancelled by the amendment in the following situations: - when the order is in
* partially filled status and the new `quantity` <= `executedQty` -
* When the order is `GTX` and the new price will cause it to be executed immediately
- * - One order can only be modfied for less than 10000 times
+ * - One order can only be modfied for less than 10000 times - `reduceOnly` behavior:
+ * - `false` or omitted: behave as today — `min_notional` is enforced on the
+ * modified order. - `true` and the original order's `reduceOnly`
+ * attribute is also `true` (consistent): the `min_notional` check is
+ * skipped on the modified order, matching placement semantics. - `true` but the
+ * original order's `reduceOnly` attribute is `false` (inconsistent):
+ * the modify request is rejected with error code `-5047`, \"The original order
+ * is not a reduce-only order\". - `reduceOnly` is used purely for validation —
+ * passing `true` does not change the original order's `reduceOnly`
+ * attribute; that flag remains whatever it was set to at placement time.
*/
public void modifyOrderExampleSync() {
ModifyOrderRequest modifyOrderRequest = new ModifyOrderRequest();
diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java
index 7ab4bb75a..c1fb2df03 100644
--- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java
+++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java
@@ -26,9 +26,9 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() {
*
*
Trading session information for the underlying assets of TradFi Perpetual contracts,
* covering the U.S. equity market, Korean equity market, Hong Kong equity market, China equity
- * market, and the commodity market, is updated every second. Trading session information for
- * different underlying markets is pushed in separate messages. **Event type:** -
- * `EquityUpdate`: Session types for the U.S. equity market include
+ * market, the commodity market, and the FX market, is updated every second. Trading session
+ * information for different underlying markets is pushed in separate messages. **Event type:**
+ * - `EquityUpdate`: Session types for the U.S. equity market include
* \"PRE_MARKET\", \"REGULAR\", \"AFTER_MARKET\",
* \"OVERNIGHT\", and \"NO_TRADING\". - `CommodityUpdate`: Session
* types for the commodity market include \"REGULAR\" and \"NO_TRADING\". -
@@ -36,7 +36,9 @@ public DerivativesTradingUsdsFuturesWebSocketStreams getApi() {
* \"REGULAR\" and \"NO_TRADING\". - `HK_EquityUpdate`: Session
* types for the Hong Kong equity market include \"REGULAR\" and
* \"NO_TRADING\". - `CN_EquityUpdate`: Session types for the China equity
- * market include \"REGULAR\" and \"NO_TRADING\". Update Speed: 1s
+ * market include \"REGULAR\" and \"NO_TRADING\". - `FXUpdate`:
+ * Session types for the FX market include \"REGULAR\" and \"NO_TRADING\".
+ * Update Speed: 1s
*
* @throws ApiException if the Api call fails
*/