Skip to content

Commit 5eb9e2c

Browse files
author
github-actions
committed
Release margin-trading v2.0.0
1 parent 7988bb3 commit 5eb9e2c

File tree

15 files changed

+713
-11
lines changed

15 files changed

+713
-11
lines changed

clients/margin-trading/CHANGELOG.md

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

3+
## 2.0.0 - 2025-06-17
4+
5+
### Added (1)
6+
7+
- `get_list_schedule()` (`GET /sapi/v1/margin/list-schedule`)
8+
39
## 1.1.0 - 2025-05-02
410

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

clients/margin-trading/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-margin-trading</artifactId>
25-
<version>1.1.0</version>
25+
<version>2.0.0</version>
2626
</dependency>
2727
```
2828

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

clients/margin-trading/example_rest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
[GET /sapi/v1/margin/delist-schedule](https://developers.binance.com/docs/margin_trading/market-data/Get-Delist-Schedule) - getDelistSchedule - [GetDelistScheduleExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetDelistScheduleExample.java#L47)
5050

51+
[GET /sapi/v1/margin/list-schedule](https://developers.binance.com/docs/margin_trading/market-data/Get-list-Schedule) - getListSchedule - [GetListScheduleExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/GetListScheduleExample.java#L48)
52+
5153
[GET /sapi/v1/margin/isolatedMarginTier](https://developers.binance.com/docs/margin_trading/market-data/Query-Isolated-Margin-Tier-Data) - queryIsolatedMarginTierData - [QueryIsolatedMarginTierDataExample.java:48](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryIsolatedMarginTierDataExample.java#L48)
5254

5355
[GET /sapi/v1/margin/leverageBracket](https://developers.binance.com/docs/margin_trading/market-data/Query-Liability-Coin-Leverage-Bracket-in-Cross-Margin-Pro-Mode) - queryLiabilityCoinLeverageBracketInCrossMarginProMode - [QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java:47](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/marketdata/QueryLiabilityCoinLeverageBracketInCrossMarginProModeExample.java#L47)

clients/margin-trading/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-margin-trading</artifactId>
77
<name>margin-trading</name>
8-
<version>1.1.0</version>
8+
<version>2.0.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.2.1</version>
3535
</dependency>
3636
</dependencies>
3737
</project>

clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/JSON.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ private static Class getClassByDiscriminator(
196196
gsonBuilder.registerTypeAdapterFactory(
197197
new com.binance.connector.client.margin_trading.rest.model
198198
.GetInterestHistoryResponseRowsInner.CustomTypeAdapterFactory());
199+
gsonBuilder.registerTypeAdapterFactory(
200+
new com.binance.connector.client.margin_trading.rest.model.GetListScheduleResponse
201+
.CustomTypeAdapterFactory());
202+
gsonBuilder.registerTypeAdapterFactory(
203+
new com.binance.connector.client.margin_trading.rest.model
204+
.GetListScheduleResponseInner.CustomTypeAdapterFactory());
199205
gsonBuilder.registerTypeAdapterFactory(
200206
new com.binance.connector.client.margin_trading.rest.model
201207
.GetSmallLiabilityExchangeCoinListResponse.CustomTypeAdapterFactory());

clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class AccountApi {
5555

5656
private static final String USER_AGENT =
5757
String.format(
58-
"binance-margin-trading/1.1.0 (Java/%s; %s; %s)",
58+
"binance-margin-trading/2.0.0 (Java/%s; %s; %s)",
5959
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
6060
private static final boolean HAS_TIME_UNIT = false;
6161

clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java

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

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

clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.binance.connector.client.margin_trading.rest.model.GetForceLiquidationRecordResponse;
2424
import com.binance.connector.client.margin_trading.rest.model.GetFutureHourlyInterestRateResponse;
2525
import com.binance.connector.client.margin_trading.rest.model.GetInterestHistoryResponse;
26+
import com.binance.connector.client.margin_trading.rest.model.GetListScheduleResponse;
2627
import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeCoinListResponse;
2728
import com.binance.connector.client.margin_trading.rest.model.GetSmallLiabilityExchangeHistoryResponse;
2829
import com.binance.connector.client.margin_trading.rest.model.GetSummaryOfMarginAccountResponse;
@@ -716,6 +717,30 @@ public ApiResponse<GetDelistScheduleResponse> getDelistSchedule(Long recvWindow)
716717
return marketDataApi.getDelistSchedule(recvWindow);
717718
}
718719

720+
/**
721+
* Get list Schedule (MARKET_DATA) Get the upcoming tokens or symbols listing schedule for Cross
722+
* Margin and Isolated Margin. Weight: 100
723+
*
724+
* @param recvWindow No more than 60000 (optional)
725+
* @return ApiResponse&lt;GetListScheduleResponse&gt;
726+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
727+
* response body
728+
* @http.response.details
729+
* <table border="1">
730+
* <caption>Response Details</caption>
731+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
732+
* <tr><td> 200 </td><td> Get list Schedule </td><td> - </td></tr>
733+
* </table>
734+
*
735+
* @see <a
736+
* href="https://developers.binance.com/docs/margin_trading/market-data/Get-list-Schedule">Get
737+
* list Schedule (MARKET_DATA) Documentation</a>
738+
*/
739+
public ApiResponse<GetListScheduleResponse> getListSchedule(Long recvWindow)
740+
throws ApiException {
741+
return marketDataApi.getListSchedule(recvWindow);
742+
}
743+
719744
/**
720745
* Query Isolated Margin Tier Data (USER_DATA) Get isolated margin tier data collection with any
721746
* tier as https://www.binance.com/en/margin-data Weight: 1(IP)

clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.binance.connector.client.margin_trading.rest.model.GetAllIsolatedMarginSymbolResponse;
2525
import com.binance.connector.client.margin_trading.rest.model.GetAllMarginAssetsResponse;
2626
import com.binance.connector.client.margin_trading.rest.model.GetDelistScheduleResponse;
27+
import com.binance.connector.client.margin_trading.rest.model.GetListScheduleResponse;
2728
import com.binance.connector.client.margin_trading.rest.model.QueryIsolatedMarginTierDataResponse;
2829
import com.binance.connector.client.margin_trading.rest.model.QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse;
2930
import com.binance.connector.client.margin_trading.rest.model.QueryMarginAvailableInventoryResponse;
@@ -50,7 +51,7 @@ public class MarketDataApi {
5051

5152
private static final String USER_AGENT =
5253
String.format(
53-
"binance-margin-trading/1.1.0 (Java/%s; %s; %s)",
54+
"binance-margin-trading/2.0.0 (Java/%s; %s; %s)",
5455
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
5556
private static final boolean HAS_TIME_UNIT = false;
5657

@@ -754,6 +755,139 @@ public ApiResponse<GetDelistScheduleResponse> getDelistSchedule(Long recvWindow)
754755
return localVarApiClient.execute(localVarCall, localVarReturnType);
755756
}
756757

758+
/**
759+
* Build call for getListSchedule
760+
*
761+
* @param recvWindow No more than 60000 (optional)
762+
* @return Call to execute
763+
* @throws ApiException If fail to serialize the request body object
764+
* @http.response.details
765+
* <table border="1">
766+
* <caption>Response Details</caption>
767+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
768+
* <tr><td> 200 </td><td> Get list Schedule </td><td> - </td></tr>
769+
* </table>
770+
*
771+
* @see <a
772+
* href="https://developers.binance.com/docs/margin_trading/market-data/Get-list-Schedule">Get
773+
* list Schedule (MARKET_DATA) Documentation</a>
774+
*/
775+
private okhttp3.Call getListScheduleCall(Long recvWindow) throws ApiException {
776+
String basePath = null;
777+
// Operation Servers
778+
String[] localBasePaths = new String[] {};
779+
780+
// Determine Base Path to Use
781+
if (localCustomBaseUrl != null) {
782+
basePath = localCustomBaseUrl;
783+
} else if (localBasePaths.length > 0) {
784+
basePath = localBasePaths[localHostIndex];
785+
} else {
786+
basePath = null;
787+
}
788+
789+
Object localVarPostBody = null;
790+
791+
// create path and map variables
792+
String localVarPath = "/sapi/v1/margin/list-schedule";
793+
794+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
795+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
796+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
797+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
798+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
799+
800+
if (recvWindow != null) {
801+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow));
802+
}
803+
804+
final String[] localVarAccepts = {"application/json"};
805+
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
806+
if (localVarAccept != null) {
807+
localVarHeaderParams.put("Accept", localVarAccept);
808+
}
809+
810+
final String[] localVarContentTypes = {"application/x-www-form-urlencoded"};
811+
final String localVarContentType =
812+
localVarApiClient.selectHeaderContentType(localVarContentTypes);
813+
if (localVarContentType != null) {
814+
localVarHeaderParams.put("Content-Type", localVarContentType);
815+
}
816+
List<String> localVarAuthNames = new ArrayList<>();
817+
localVarAuthNames.addAll(Arrays.asList(new String[] {}));
818+
if (HAS_TIME_UNIT) {
819+
localVarAuthNames.add("timeUnit");
820+
}
821+
return localVarApiClient.buildCall(
822+
basePath,
823+
localVarPath,
824+
"GET",
825+
localVarQueryParams,
826+
localVarCollectionQueryParams,
827+
localVarPostBody,
828+
localVarHeaderParams,
829+
localVarCookieParams,
830+
localVarFormParams,
831+
localVarAuthNames.toArray(new String[0]));
832+
}
833+
834+
@SuppressWarnings("rawtypes")
835+
private okhttp3.Call getListScheduleValidateBeforeCall(Long recvWindow) throws ApiException {
836+
try {
837+
Validator validator =
838+
Validation.byDefaultProvider()
839+
.configure()
840+
.messageInterpolator(new ParameterMessageInterpolator())
841+
.buildValidatorFactory()
842+
.getValidator();
843+
ExecutableValidator executableValidator = validator.forExecutables();
844+
845+
Object[] parameterValues = {recvWindow};
846+
Method method = this.getClass().getMethod("getListSchedule", Long.class);
847+
Set<ConstraintViolation<MarketDataApi>> violations =
848+
executableValidator.validateParameters(this, method, parameterValues);
849+
850+
if (violations.size() == 0) {
851+
return getListScheduleCall(recvWindow);
852+
} else {
853+
throw new ConstraintViolationException((Set) violations);
854+
}
855+
} catch (NoSuchMethodException e) {
856+
e.printStackTrace();
857+
throw new ApiException(e.getMessage());
858+
} catch (SecurityException e) {
859+
e.printStackTrace();
860+
throw new ApiException(e.getMessage());
861+
}
862+
}
863+
864+
/**
865+
* Get list Schedule (MARKET_DATA) Get the upcoming tokens or symbols listing schedule for Cross
866+
* Margin and Isolated Margin. Weight: 100
867+
*
868+
* @param recvWindow No more than 60000 (optional)
869+
* @return ApiResponse&lt;GetListScheduleResponse&gt;
870+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
871+
* response body
872+
* @http.response.details
873+
* <table border="1">
874+
* <caption>Response Details</caption>
875+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
876+
* <tr><td> 200 </td><td> Get list Schedule </td><td> - </td></tr>
877+
* </table>
878+
*
879+
* @see <a
880+
* href="https://developers.binance.com/docs/margin_trading/market-data/Get-list-Schedule">Get
881+
* list Schedule (MARKET_DATA) Documentation</a>
882+
*/
883+
public ApiResponse<GetListScheduleResponse> getListSchedule(Long recvWindow)
884+
throws ApiException {
885+
okhttp3.Call localVarCall = getListScheduleValidateBeforeCall(recvWindow);
886+
java.lang.reflect.Type localVarReturnType =
887+
new TypeToken<GetListScheduleResponse>() {}.getType();
888+
return localVarApiClient.execute(localVarCall, localVarReturnType);
889+
}
890+
757891
/**
758892
* Build call for queryIsolatedMarginTierData
759893
*

clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/RiskDataStreamApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class RiskDataStreamApi {
4444

4545
private static final String USER_AGENT =
4646
String.format(
47-
"binance-margin-trading/1.1.0 (Java/%s; %s; %s)",
47+
"binance-margin-trading/2.0.0 (Java/%s; %s; %s)",
4848
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
4949
private static final boolean HAS_TIME_UNIT = false;
5050

0 commit comments

Comments
 (0)