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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

<artifactId>binance-common</artifactId>
<name>common</name>
<version>2.5.1</version>
<version>2.5.2</version>
<packaging>jar</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void onWebSocketText(String message) {

// Response to subscribe
JsonElement id = obj.get("id");
if (id != null) {
if (id != null && !id.isJsonNull()) {
JsonElement result = obj.get("result");
RequestWrapperDTO requestWrapperDTO = pendingRequest.get(id.getAsString());
Type responseType = requestWrapperDTO.getResponseType();
Expand Down
26 changes: 26 additions & 0 deletions clients/derivatives-trading-usds-futures/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 12.1.0 - 2026-09-21

### Changed (5)

#### REST API

- Added parameter `reduceOnly`
- affected methods:
- `modifyOrder()` (`PUT /fapi/v1/order`)
- Modified parameter `incomeType`:
- enum added: `SPECIAL_FUNDING_FEE`
- affected methods:
- `getIncomeHistory()` (`GET /fapi/v1/income`)
- Modified response for `tradingSchedule()` (`GET /fapi/v1/tradingSchedule`):
- `marketSchedules`: property `FX` added

- Modified response field `marketSchedules`:
- property `FX` added
- affected events:
- `tradingScheduleResponse`
#### WebSocket API

- Added parameter `reduceOnly`
- affected methods:
- `modifyOrder()` (`order.modify` method)

## 12.0.3 - 2026-08-27

### Changed (1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
|**newClientOrderId** | **String** | | [optional] |
|**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] |
|**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can&#39;t be passed together with price | [optional] |
|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | 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 | [optional] |
|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | 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 | [optional] |
|**goodTillDate** | **Long** | Auto-cancel time for &#x60;GTD&#x60; orders. | [optional] |


Expand Down
2 changes: 2 additions & 0 deletions clients/derivatives-trading-usds-futures/docs/IncomeType.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@

* `BFUSD_REWARD` (value: `"BFUSD_REWARD"`)

* `SPECIAL_FUNDING_FEE` (value: `"SPECIAL_FUNDING_FEE"`)



2 changes: 1 addition & 1 deletion clients/derivatives-trading-usds-futures/docs/MarketApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ No authorization required

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:** - &#x60;EquityUpdate&#x60;: Session types for the U.S. equity market include \&quot;PRE_MARKET\&quot;, \&quot;REGULAR\&quot;, \&quot;AFTER_MARKET\&quot;, \&quot;OVERNIGHT\&quot;, and \&quot;NO_TRADING\&quot;. - &#x60;CommodityUpdate&#x60;: Session types for the commodity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;KR_EquityUpdate&#x60;: Session types for the Korean equity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;HK_EquityUpdate&#x60;: Session types for the Hong Kong equity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;CN_EquityUpdate&#x60;: Session types for the China equity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. Update Speed: 1s
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, 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:** - &#x60;EquityUpdate&#x60;: Session types for the U.S. equity market include \&quot;PRE_MARKET\&quot;, \&quot;REGULAR\&quot;, \&quot;AFTER_MARKET\&quot;, \&quot;OVERNIGHT\&quot;, and \&quot;NO_TRADING\&quot;. - &#x60;CommodityUpdate&#x60;: Session types for the commodity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;KR_EquityUpdate&#x60;: Session types for the Korean equity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;HK_EquityUpdate&#x60;: Session types for the Hong Kong equity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;CN_EquityUpdate&#x60;: Session types for the China equity market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. - &#x60;FXUpdate&#x60;: Session types for the FX market include \&quot;REGULAR\&quot; and \&quot;NO_TRADING\&quot;. Update Speed: 1s

### Example
```java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
|**price** | **Double** | Price. | |
|**priceMatch** | **PriceMatch** | | [optional] |
|**modifyId** | **Long** | User-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness. | [optional] |
|**reduceOnly** | **ReduceOnly** | | [optional] |
|**recvWindow** | **Long** | Recv Window. | [optional] |


Expand Down
2 changes: 1 addition & 1 deletion clients/derivatives-trading-usds-futures/docs/TradeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ No authorization required

Modify Order (TRADE)

Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 0 on IP rate limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either &#x60;orderId&#x60; or &#x60;origClientOrderId&#x60; must be sent, and the &#x60;orderId&#x60; will prevail if both are sent. - Both &#x60;quantity&#x60; and &#x60;price&#x60; must be sent. *(After CM migration, the dapi modify order endpoint follows the same rule.)* - When the new &#x60;quantity&#x60; or &#x60;price&#x60; doesn&#39;t satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is. - However the order will be cancelled by the amendment in the following situations: - when the order is in partially filled status and the new &#x60;quantity&#x60; &lt;&#x3D; &#x60;executedQty&#x60; - When the order is &#x60;GTX&#x60; and the new price will cause it to be executed immediately - One order can only be modfied for less than 10000 times
Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 0 on IP rate limit(x-mbx-used-weight-1m) Security Type: TRADE Notes: - Either &#x60;orderId&#x60; or &#x60;origClientOrderId&#x60; must be sent, and the &#x60;orderId&#x60; will prevail if both are sent. - Both &#x60;quantity&#x60; and &#x60;price&#x60; must be sent. *(After CM migration, the dapi modify order endpoint follows the same rule.)* - When the new &#x60;quantity&#x60; or &#x60;price&#x60; doesn&#39;t satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is. - However the order will be cancelled by the amendment in the following situations: - when the order is in partially filled status and the new &#x60;quantity&#x60; &lt;&#x3D; &#x60;executedQty&#x60; - When the order is &#x60;GTX&#x60; and the new price will cause it to be executed immediately - One order can only be modfied for less than 10000 times - &#x60;reduceOnly&#x60; behavior: - &#x60;false&#x60; or omitted: behave as today — &#x60;min_notional&#x60; is enforced on the modified order. - &#x60;true&#x60; and the original order&#39;s &#x60;reduceOnly&#x60; attribute is also &#x60;true&#x60; (consistent): the &#x60;min_notional&#x60; check is skipped on the modified order, matching placement semantics. - &#x60;true&#x60; but the original order&#39;s &#x60;reduceOnly&#x60; attribute is &#x60;false&#x60; (inconsistent): the modify request is rejected with error code &#x60;-5047&#x60;, \&quot;The original order is not a reduce-only order\&quot;. - &#x60;reduceOnly&#x60; is used purely for validation — passing &#x60;true&#x60; does not change the original order&#39;s &#x60;reduceOnly&#x60; attribute; that flag remains whatever it was set to at placement time.

### Example
```java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
|**KR_EQUITY** | [**TradingScheduleResponseMarketSchedulesKREQUITY**](TradingScheduleResponseMarketSchedulesKREQUITY.md) | | [optional] |
|**HK_EQUITY** | [**TradingScheduleResponseMarketSchedulesHKEQUITY**](TradingScheduleResponseMarketSchedulesHKEQUITY.md) | | [optional] |
|**CN_EQUITY** | [**TradingScheduleResponseMarketSchedulesHKEQUITY**](TradingScheduleResponseMarketSchedulesHKEQUITY.md) | | [optional] |
|**FX** | [**TradingScheduleResponseMarketSchedulesFX**](TradingScheduleResponseMarketSchedulesFX.md) | | [optional] |



Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# TradingScheduleResponseMarketSchedulesFX


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**sessions** | [**List&lt;TradingScheduleResponseMarketSchedulesFXSessionsInner&gt;**](TradingScheduleResponseMarketSchedulesFXSessionsInner.md) | | [optional] |



Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# TradingScheduleResponseMarketSchedulesFXSessionsInner


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**startTime** | **Long** | | [optional] |
|**endTime** | **Long** | | [optional] |
|**type** | **String** | | [optional] |



Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**eLowerCase** | **String** | Event type, can also be CommodityUpdate, KR_EquityUpdate, HK_EquityUpdate or CN_EquityUpdate | [optional] |
|**eLowerCase** | **String** | Event type, can also be CommodityUpdate, KR_EquityUpdate, HK_EquityUpdate, CN_EquityUpdate or FXUpdate | [optional] |
|**E** | **Long** | Event time | [optional] |
|**tLowerCase** | **Long** | Session start time | [optional] |
|**T** | **Long** | Session end time | [optional] |
Expand Down
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-derivatives-trading-usds-futures</artifactId>
<version>12.0.3</version>
<version>12.1.0</version>
</dependency>
```

Expand Down Expand Up @@ -91,7 +91,7 @@ by:
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-derivatives-trading-usds-futures</artifactId>
<version>12.0.3</version>
<version>12.1.0</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions clients/derivatives-trading-usds-futures/example_rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

[GET /futures/data/topLongShortPositionRatio](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-positions) - topTraderLongShortRatioPositions - [TopTraderLongShortRatioPositionsExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TopTraderLongShortRatioPositionsExample.java#L43)

[GET /fapi/v1/tradingSchedule](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#trading-schedule) - tradingSchedule - [TradingScheduleExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java#L45)
[GET /fapi/v1/tradingSchedule](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data#trading-schedule) - tradingSchedule - [TradingScheduleExample.java:46](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/marketdata/TradingScheduleExample.java#L46)

## PortfolioMarginEndpoints

Expand Down Expand Up @@ -166,7 +166,7 @@

[PUT /fapi/v1/batchOrders](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-multiple-orders) - modifyMultipleOrders - [ModifyMultipleOrdersExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyMultipleOrdersExample.java#L43)

[PUT /fapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-order) - modifyOrder - [ModifyOrderExample.java:50](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java#L50)
[PUT /fapi/v1/order](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#modify-order) - modifyOrder - [ModifyOrderExample.java:59](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/ModifyOrderExample.java#L59)

[POST /fapi/v1/algoOrder](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/trade#new-algo-order) - newAlgoOrder - [NewAlgoOrderExample.java:75](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/trade/NewAlgoOrderExample.java#L75)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

[order.cancel](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#cancel-order) - cancelOrder - [CancelOrderExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/CancelOrderExample.java#L37)

[order.modify](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#modify-order) - modifyOrder - [ModifyOrderExample.java:49](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java#L49)
[order.modify](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#modify-order) - modifyOrder - [ModifyOrderExample.java:58](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/ModifyOrderExample.java#L58)

[algoOrder.place](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-api/trade#new-algo-order) - newAlgoOrder - [NewAlgoOrderExample.java:69](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/trade/NewAlgoOrderExample.java#L69)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

[!markPrice@arr@<updateSpeed>](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#mark-price-stream-for-all-market) - markPriceStreamForAllMarket - [MarkPriceStreamForAllMarketExample.java:35](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/MarkPriceStreamForAllMarketExample.java#L35)

[tradingSession](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#trading-session-stream) - tradingSessionStream - [TradingSessionStreamExample.java:43](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java#L43)
[tradingSession](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#trading-session-stream) - tradingSessionStream - [TradingSessionStreamExample.java:45](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/market/TradingSessionStreamExample.java#L45)

## Public

Expand Down
4 changes: 2 additions & 2 deletions clients/derivatives-trading-usds-futures/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-derivatives-trading-usds-futures</artifactId>
<name>derivatives-trading-usds-futures</name>
<version>12.0.3</version>
<version>12.1.0</version>
<packaging>jar</packaging>

<parent>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-common</artifactId>
<version>2.5.1</version>
<version>2.5.2</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,13 @@ private static Class getClassByDiscriminator(
new com.binance.connector.client.derivatives_trading_usds_futures.rest.model
.TradingScheduleResponseMarketSchedulesEQUITYSessionsInner
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_usds_futures.rest.model
.TradingScheduleResponseMarketSchedulesFX.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_usds_futures.rest.model
.TradingScheduleResponseMarketSchedulesFXSessionsInner
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.derivatives_trading_usds_futures.rest.model
.TradingScheduleResponseMarketSchedulesHKEQUITY.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class AccountApi {

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 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 ConvertApi {

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 static final boolean HAS_TIME_UNIT = false;

Expand Down
Loading
Loading