2424import com .binance .connector .client .margin_trading .rest .model .GetAllIsolatedMarginSymbolResponse ;
2525import com .binance .connector .client .margin_trading .rest .model .GetAllMarginAssetsResponse ;
2626import com .binance .connector .client .margin_trading .rest .model .GetDelistScheduleResponse ;
27+ import com .binance .connector .client .margin_trading .rest .model .GetListScheduleResponse ;
2728import com .binance .connector .client .margin_trading .rest .model .QueryIsolatedMarginTierDataResponse ;
2829import com .binance .connector .client .margin_trading .rest .model .QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse ;
2930import 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<GetListScheduleResponse>
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 *
0 commit comments